[Libvirt-cim] [PATCH 2 of 2] Don't drop disk type on redefine
Dan Smith
danms at us.ibm.com
Thu Nov 6 21:11:25 UTC 2008
# HG changeset patch
# User Dan Smith <danms at us.ibm.com>
# Date 1226005678 28800
# Node ID 9d100a5442150eedf372598f5033db100f47eddd
# Parent 049f0bb012190e680257d00463138391405a5c60
Don't drop disk type on redefine
Right now, we track the status of disk/cdrom of a disk device, but don't
use it in the XML define. This patch uses the value instead of a static
device='disk'.
Signed-off-by: Dan Smith <danms at us.ibm.com>
diff -r 049f0bb01219 -r 9d100a544215 libxkutil/xmlgen.c
--- a/libxkutil/xmlgen.c Thu Nov 06 13:07:56 2008 -0800
+++ b/libxkutil/xmlgen.c Thu Nov 06 13:07:58 2008 -0800
@@ -119,12 +119,13 @@
int ret;
ret = asprintf(&xml,
- "<disk type='block' device='disk'>\n"
+ "<disk type='block' device='%s'>\n"
" <source dev='%s'/>\n"
" <target dev='%s'/>\n"
"%s"
"%s"
"</disk>\n",
+ dev->device,
dev->source,
dev->virtual_dev,
dev->readonly ? "<readonly/>\n" : "",
@@ -141,12 +142,13 @@
int ret;
ret = asprintf(&xml,
- "<disk type='file' device='disk'>\n"
+ "<disk type='file' device='%s'>\n"
" <source file='%s'/>\n"
" <target dev='%s'/>\n"
"%s"
"%s"
"</disk>\n",
+ dev->device,
dev->source,
dev->virtual_dev,
dev->readonly ? "<readonly/>" : "",
More information about the Libvirt-cim
mailing list