[Libvirt-cim] [PATCH] Update CS and VSMS for compare_ref changes

Kaitlin Rupert kaitlin at linux.vnet.ibm.com
Wed Nov 7 19:39:53 UTC 2007


Dan Smith wrote:
> # HG changeset patch
> # User Dan Smith <danms at us.ibm.com>
> # Date 1194453696 28800
> # Node ID 55d37343f11204b02dde1df910001e8021a5afc5
> # Parent  704edab17bc7ceac8a0d59285cf7bfb3c900b188
> Update CS and VSMS for compare_ref changes
>
> Signed-off-by: Dan Smith <danms at us.ibm.com>
>
> -        prop = cu_compare_ref(ref, inst, props);
> +        prop = cu_compare_ref(ref, inst);
>          if (prop != NULL) {
>                  cu_statusf(_BROKER, &s,
>                             CMPI_RC_ERR_NOT_FOUND,
> -                           "No such instance (%s)", prop->name);
> +                           "No such instance (%s)", prop);
>          } else {
>                  CMSetStatus(&s, CMPI_RC_OK);
>                  CMReturnInstance(results, inst);
>
>   
I realized I already ack'ed the cu_compare_ref(), but here I realized 
that you're returning prop from cu_compare_ref().  prop is only 
meaningful when it's NULL - that is, in the case of an error.  
Otherwise, you're just returning the last prop in the list.  Would a 
status value be more useful?

-- 
Kaitlin Rupert
IBM Linux Technology Center
karupert at us.ibm.com





More information about the Libvirt-cim mailing list