+1
Sharad Mishra
Open Virtualization
Linux Technology Center
IBM
libvirt-cim-bounces(a)redhat.com wrote on 05/05/2010 10:50:02 AM:
Chip Vincent <cvincent(a)linux.vnet.ibm.com>
Sent by: libvirt-cim-bounces(a)redhat.com
05/05/2010 10:50 AM
Please respond to
List for discussion and development of libvirt CIM
<libvirt-cim(a)redhat.com>
To
libvirt-cim(a)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(a)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(a)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(a)redhat.com
https://www.redhat.com/mailman/listinfo/libvirt-cim