[Libvirt-cim] [PATCH 2 of 7] DevicePool: reorganize get and enum functions

Dan Smith danms at us.ibm.com
Wed Mar 5 17:17:20 UTC 2008


HE> @@ -673,177 +681,190 @@ static CMPIStatus diskpool_instance(virC
HE>          return s;
HE>  }

HE> -static CMPIStatus _get_pool(const CMPIBroker *broker,
HE> -                            virConnectPtr conn,
HE> -                            const char *type,
HE> +static CMPIStatus _get_pools(const CMPIBroker *broker,
HE> +                             const CMPIObjectPath *reference,
HE> +                             const uint16_t type,
HE> +                             const char *id,
HE> +                             struct inst_list *list)
HE> +{
HE> +        CMPIStatus s = {CMPI_RC_OK, NULL};
HE> +        virConnectPtr conn;
HE> +
HE> +        conn = connect_by_classname(broker, CLASSNAME(reference), &s);
HE> +        if (conn == NULL)
HE> +                goto out;
HE> +
HE> +        if ((type == CIM_POOL_TYPE_PROC) || 
HE> +            (type == CIM_TYPE_ALL))
HE> +                s = procpool_instance(conn, list,
HE> +                                      NAMESPACE(reference),
HE> +                                      id, broker);
HE> +
HE> +        if ((type == CIM_POOL_TYPE_MEM) || 
HE> +            (type == CIM_TYPE_ALL))
HE> +                s = mempool_instance(conn, list,
HE> +                                     NAMESPACE(reference),
HE> +                                     id, broker);
HE> +
HE> +        if ((type == CIM_POOL_TYPE_NET) || 
HE> +            (type == CIM_TYPE_ALL))
HE> +                s = netpool_instance(conn, list,
HE> +                                     NAMESPACE(reference),
HE> +                                     id, broker);
HE> +
HE> +        if ((type == CIM_POOL_TYPE_DISK) || 
HE> +            (type == CIM_TYPE_ALL))
HE> +                s = diskpool_instance(conn, list,
HE> +                                      NAMESPACE(reference),
HE> +                                      id, broker);
HE> +
HE> +        if (type == CIM_POOL_TYPE_UNKNOWN)
HE> +                cu_statusf(broker, &s,
HE> +                           CMPI_RC_ERR_NOT_FOUND,
HE> +                           "No such instance - resource pool type unknow.");
                                                                       ^^^^^^^
You're missing an 'n' there, and the period should be removed.

HE> +        if (id && list->cur == 0)
HE> +                cu_statusf(broker, &s,
HE> +                           CMPI_RC_ERR_NOT_FOUND,
HE> +                           "No such instance (%s).", id);

As well as this period.

-- 
Dan Smith
IBM Linux Technology Center
Open Hypervisor Team
email: danms at us.ibm.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 188 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/libvirt-cim/attachments/20080305/209f4562/attachment.sig>


More information about the Libvirt-cim mailing list