]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
* src/xml.c: added dump of physical vbd and read-only status
authorDaniel Veillard <veillard@redhat.com>
Wed, 14 Dec 2005 12:36:43 +0000 (12:36 +0000)
committerDaniel Veillard <veillard@redhat.com>
Wed, 14 Dec 2005 12:36:43 +0000 (12:36 +0000)
Daniel

ChangeLog
src/xml.c

index 609d46887b73f745e685cc8821b5478d9c4e32cc..a11a11a5f5c6a2c8a7cb0084f9aa230aaf6c1226 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+Wed Dec 14 13:35:39 CET 2005 Daniel Veillard <veillard@redhat.com>
+
+       * src/xml.c: added dump of physical vbd and read-only status
+
 Wed Dec 14 12:20:06 CET 2005 Daniel Veillard <veillard@redhat.com>
 
        * src/xml.c: started to add block devices and interfaces descriptions
index 959effa596abc97a656617d74d23e84fa83effa2..15f69a7b66311102c85fff62943a47a5d2712f56 100644 (file)
--- a/src/xml.c
+++ b/src/xml.c
@@ -196,6 +196,29 @@ virDomainGetXMLDevice(virDomainPtr domain, virBufferPtr buf, long dev) {
            virBufferVSprintf(buf, "      <target dev='%s'/>\n", val);
            free(val);
        }
+       val = virDomainGetXMLDeviceInfo(domain, "vbd", dev, "read-only");
+       if (val != NULL) {
+           virBufferVSprintf(buf, "      <readonly/>\n", val);
+           free(val);
+       }
+       virBufferAdd(buf, "    </disk>\n", 12);
+    } else if (!strcmp(type, "phy")) {
+       virBufferVSprintf(buf, "    <disk type='device'>\n");
+       val = virDomainGetXMLDeviceInfo(domain, "vbd", dev, "params");
+       if (val != NULL) {
+           virBufferVSprintf(buf, "      <source device='%s'/>\n", val);
+           free(val);
+       }
+       val = virDomainGetXMLDeviceInfo(domain, "vbd", dev, "dev");
+       if (val != NULL) {
+           virBufferVSprintf(buf, "      <target dev='%s'/>\n", val);
+           free(val);
+       }
+       val = virDomainGetXMLDeviceInfo(domain, "vbd", dev, "read-only");
+       if (val != NULL) {
+           virBufferVSprintf(buf, "      <readonly/>\n", val);
+           free(val);
+       }
        virBufferAdd(buf, "    </disk>\n", 12);
     } else {
         TODO