[Libvirt-cim] [PATCH] Fix memory XML parsing so that max_size is set to the memory value

Kaitlin Rupert kaitlin at linux.vnet.ibm.com
Tue Sep 2 22:06:06 UTC 2008


# HG changeset patch
# User Kaitlin Rupert <karupert at us.ibm.com>
# Date 1220392087 25200
# Node ID 2796fd3e2eaa202206430ad59c01dd01cd982ccd
# Parent  2db1158cea318cfee11a77724c97a0b4758ffb2c
Fix memory XML parsing so that max_size is set to the memory value...

And size is set to the value of currentMem.

Signed-off-by: Kaitlin Rupert <karupert at us.ibm.com>

diff -r 2db1158cea31 -r 2796fd3e2eaa libxkutil/device_parsing.c
--- a/libxkutil/device_parsing.c	Fri Aug 29 08:16:56 2008 -0700
+++ b/libxkutil/device_parsing.c	Tue Sep 02 14:48:07 2008 -0700
@@ -407,9 +407,9 @@
 
         content = get_node_content(node);
 
-        if (XSTREQ(node->name, "memory"))
+        if (XSTREQ(node->name, "currentMemory"))
                 sscanf(content, "%" PRIu64, &mdev->size);
-        else if (XSTREQ(node->name, "currentMemory"))
+        else if (XSTREQ(node->name, "memory"))
                 sscanf(content, "%" PRIu64, &mdev->maxsize);
 
         free(content);




More information about the Libvirt-cim mailing list