
# HG changeset patch # User Dan Smith <danms@us.ibm.com> # Date 1195499376 28800 # Node ID 0912b735d6a65db09f6f9e671bc7cccd5122532c # Parent b58e0f79b99e8c9eaedb7a9c2b4dbd194afc2a8d Fix uses of get_typed_*() in DevicePool Signed-off-by: Dan Smith <danms@us.ibm.com> diff -r b58e0f79b99e -r 0912b735d6a6 src/Virt_DevicePool.c --- a/src/Virt_DevicePool.c Mon Nov 19 11:05:29 2007 -0800 +++ b/src/Virt_DevicePool.c Mon Nov 19 11:09:36 2007 -0800 @@ -345,7 +345,10 @@ static CMPIStatus mempool_instance(virCo return s; } - inst = get_typed_instance(broker, "MemoryPool", ns); + inst = get_typed_instance(broker, + pfx_from_conn(conn), + "MemoryPool", + ns); mempool_set_total(inst, conn); mempool_set_reserved(inst, conn); @@ -380,7 +383,10 @@ static CMPIStatus procpool_instance(virC return s; } - inst = get_typed_instance(broker, "ProcessorPool", ns); + inst = get_typed_instance(broker, + pfx_from_conn(conn), + "ProcessorPool", + ns); procpool_set_total(inst, conn); set_units(inst, "Processors"); @@ -399,13 +405,17 @@ static CMPIStatus _netpool_for_bridge(st static CMPIStatus _netpool_for_bridge(struct inst_list *list, const char *ns, const char *bridge, + const char *refcn, const CMPIBroker *broker) { char *id = NULL; uint16_t type = CIM_RASD_TYPE_NET; CMPIInstance *inst; - inst = get_typed_instance(broker, "NetworkPool", ns); + inst = get_typed_instance(broker, + refcn, + "NetworkPool", + ns); if (asprintf(&id, "NetworkPool/%s", bridge) == -1) return (CMPIStatus){CMPI_RC_ERR_FAILED, NULL}; @@ -440,7 +450,11 @@ static CMPIStatus netpool_instance(virCo "No such network pool `%s'", id); goto out; } - return _netpool_for_bridge(list, ns, id, broker); + return _netpool_for_bridge(list, + ns, + id, + pfx_from_conn(conn), + broker); } bridges = list_bridges(); @@ -448,7 +462,11 @@ static CMPIStatus netpool_instance(virCo return (CMPIStatus){CMPI_RC_ERR_FAILED, NULL}; for (i = 0; bridges[i]; i++) { - _netpool_for_bridge(list, ns, bridges[i], broker); + _netpool_for_bridge(list, + ns, + bridges[i], + pfx_from_conn(conn), + broker); free(bridges[i]); } @@ -461,6 +479,7 @@ static CMPIInstance *diskpool_from_path( static CMPIInstance *diskpool_from_path(const char *path, const char *id, const char *ns, + const char *refcn, const CMPIBroker *broker) { CMPIInstance *inst; @@ -470,7 +489,7 @@ static CMPIInstance *diskpool_from_path( uint64_t cap; uint64_t res; - inst = get_typed_instance(broker, "DiskPool", ns); + inst = get_typed_instance(broker, refcn, "DiskPool", ns); if (asprintf(&poolid, "DiskPool/%s", id) == -1) return NULL; @@ -536,6 +555,7 @@ static CMPIStatus diskpool_instance(virC pool = diskpool_from_path(pools[i].path, pools[i].tag, ns, + pfx_from_conn(conn), broker); if (pool != NULL) inst_list_add(list, pool);