Dan Smith wrote:
# HG changeset patch
# User Dan Smith <danms(a)us.ibm.com>
# Date 1200414819 28800
# Node ID f90450901ee0e616bda311a5da2e7d14c570f6fa
# Parent b2a79064df2639a6b7ade2f2bbcb21af9c66a267
Change xmlgen core to handle batches of devices
in preparation for the next patch to fix vcpu xml generation
+static bool mem_to_xml(char **xml, struct virt_device *dev)
+{
+ int ret;
+ char *_xml;
+ struct mem_device *mem = &dev->dev.mem;
+
+ ret = asprintf(&_xml,
"<currentMemory>%" PRIu64
"</currentMemory>\n"
"<memory>%" PRIu64
"</memory>\n",
mem->size,
@@ -181,91 +215,107 @@ static char *mem_to_xml(struct mem_devic
if (ret == 1)
- xml = NULL;
I think this should be if (ret == -1) here.
- return count;
+ if (concat_devxml(&xml, dev, 1, func))
+ return xml;
No complaint, just a question - why is the count being
hardcoded to 1 here?
--
Kaitlin Rupert
IBM Linux Technology Center
karupert(a)us.ibm.com