[Libvirt-cim] [PATCH] (#3) Add read-only support

Eduardo Lima (Etrunko) eblima at linux.vnet.ibm.com
Tue Jun 28 18:05:07 UTC 2011


On 06/28/2011 02:11 PM, Eduardo Lima (Etrunko) wrote:
[snip]

> diff --git a/src/Virt_AllocationCapabilities.c b/src/Virt_AllocationCapabilities.c
> --- a/src/Virt_AllocationCapabilities.c
> +++ b/src/Virt_AllocationCapabilities.c
> @@ -47,6 +47,7 @@
>                                           CLASSNAME(ref),
>                                           "AllocationCapabilities",
>                                           NAMESPACE(ref));
> +        CU_DEBUG("%s(%d): Begin", __FUNCTION__, __LINE__);
>           if (*alloc_cap == NULL) {
>                   cu_statusf(broker,&s,
>                              CMPI_RC_ERR_FAILED,
> @@ -70,6 +71,7 @@
>                   goto out;
>           }
>    out:
> +        CU_DEBUG("%s(%d): End", __FUNCTION__, __LINE__);
>           return s;
>   }
>
> @@ -85,6 +87,7 @@
>           const char *inst_id;
>           int i;
>
> +        CU_DEBUG("%s(%d): Begin", __FUNCTION__, __LINE__);
>           inst_list_init(&device_pool_list);
>
>           if (!provider_is_responsible(broker, ref,&s))
> @@ -132,6 +135,7 @@
>
>    out:
>           inst_list_free(&device_pool_list);
> +        CU_DEBUG("%s(%d): End", __FUNCTION__, __LINE__);
>
>           return s;
>   }
> @@ -144,14 +148,20 @@
>           CMPIInstance *pool;
>           CMPIStatus s;
>
> +        CU_DEBUG("%s(%d): Begin", __FUNCTION__, __LINE__);
>           s = get_pool_by_name(broker, ref, poolid,&pool);
> -        if ((pool == NULL) || (s.rc != CMPI_RC_OK))
> +        if ((pool == NULL) || (s.rc != CMPI_RC_OK)) {
> +                CU_DEBUG("%s(%d): return 1 ", __FUNCTION__, __LINE__);
>                   return s;
> +        }
>
>           s = ac_from_pool(broker, ref, pool, inst);
> -        if (s.rc != CMPI_RC_OK)
> +        if (s.rc != CMPI_RC_OK) {
> +                CU_DEBUG("%s(%d): return 2 ", __FUNCTION__, __LINE__);
>                   return s;
> +        }
>
> +        CU_DEBUG("%s(%d): End", __FUNCTION__, __LINE__);
>           return cu_validate_ref(broker, ref, *inst);
>   }
>
> @@ -165,6 +175,7 @@
>           CMPIStatus s = {CMPI_RC_OK, NULL};
>           struct inst_list list;
>
> +        CU_DEBUG("%s(%d): Begin", __FUNCTION__, __LINE__);
>           inst_list_init(&list);
>
>           s = enum_alloc_cap_instances(broker,
> @@ -183,6 +194,7 @@
>    out:
>           inst_list_free(&list);
>
> +        CU_DEBUG("%s(%d): End", __FUNCTION__, __LINE__);
>           return s;
>   }
>
> @@ -195,13 +207,16 @@
>           CMPIStatus s = {CMPI_RC_OK, NULL};
>           const char* id;
>
> +        CU_DEBUG("%s(%d): Begin", __FUNCTION__, __LINE__);
>           if (cu_get_str_path(reference, "InstanceID",&id) != CMPI_RC_OK) {
>                   cu_statusf(_BROKER,&s,
>                              CMPI_RC_ERR_FAILED,
>                              "No InstanceID specified");
> +                CU_DEBUG("%s(%d): return 1 ", __FUNCTION__, __LINE__);
>                   return s;
>           }
>
> +        CU_DEBUG("%s(%d): End", __FUNCTION__, __LINE__);
>           return return_alloc_cap_instances(_BROKER,
>                                             reference,
>                                             results,
>

Again, something that shouldn't be here. Sorry for including these debug 
messages. Yet another new version of the patch on the way.

-- 
Eduardo de Barros Lima
Software Engineer, Open Virtualization
Linux Technology Center - IBM/Brazil
eblima at br.ibm.com




More information about the Libvirt-cim mailing list