[Libvirt-cim] [PATCH] (#2) Use CIM 'AllocationUnits' to populate libvirt XML 'capacity unit' AND 'allocation unit'

Sharad Mishra snmishra at us.ibm.com
Wed May 5 19:06:34 UTC 2010


+1

Sharad Mishra
Open Virtualization
Linux Technology Center
IBM

libvirt-cim-bounces at redhat.com wrote on 05/05/2010 10:50:02 AM:

> Chip Vincent <cvincent at linux.vnet.ibm.com>
> Sent by: libvirt-cim-bounces at redhat.com
>
> 05/05/2010 10:50 AM
>
> Please respond to
> List for discussion and development of libvirt CIM
<libvirt-cim at redhat.com>
>
> To
>
> libvirt-cim at redhat.com
>
> cc
>
> Subject
>
> [Libvirt-cim] [PATCH] (#2) Use CIM 'AllocationUnits' to populate
> libvirt XML 'capacity unit' AND 'allocation unit'
>
> # HG changeset patch
> # User Chip Vincent <cvincent at us.ibm.com>
> # Date 1273081753 14400
> # Node ID 293ef309c85b1b1b3551366624275d7a9bf6fb59
> # Parent  22a4721a2d978fe611cb75255a094a0cc23abe5c
> (#2) Use CIM 'AllocationUnits' to populate libvirt XML 'capacity
> unit' AND 'allocation unit'
>
> Today, AllocationUnits only maps to capacity unit, which will leave
> allocation unit as the default (Kb). With this patch, both will be
> set to the same units.
>
> Signed-off-by: Chip Vincent <cvincent at us.ibm.com>
>
> diff -r 22a4721a2d97 -r 293ef309c85b libxkutil/xmlgen.c
> --- a/libxkutil/xmlgen.c   Tue Mar 23 16:31:41 2010 -0700
> +++ b/libxkutil/xmlgen.c   Wed May 05 13:49:13 2010 -0400
> @@ -1138,6 +1138,13 @@
>                  goto out;
>
>          free(string);
> +        if (vol->cap_units != NULL) {
> +                xmlAttrPtr tmp = NULL;
> +                tmp = xmlNewProp(cap, BAD_CAST "unit", BAD_CAST
> vol->cap_units);
> +                if (tmp == NULL)
> +                        goto out;
> +        }
> +
>          ret = asprintf(&string, "%" PRIu16, vol->cap);
>          if (ret == -1)
>                  return XML_ERROR;
>
> _______________________________________________
> Libvirt-cim mailing list
> Libvirt-cim at redhat.com
> https://www.redhat.com/mailman/listinfo/libvirt-cim
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listman.redhat.com/archives/libvirt-cim/attachments/20100505/dc318dcc/attachment.htm>


More information about the Libvirt-cim mailing list