diff options
author | 2005-12-14 12:36:43 +0000 | |
---|---|---|
committer | 2005-12-14 12:36:43 +0000 | |
commit | 5462d542b911741bd1b7ae88b2c47b24c6677248 (patch) | |
tree | ca159c5f770f7c434632f9c001738298136b3e11 | |
parent | * src/xml.c: started to add block devices and interfaces descriptions (diff) | |
download | libvirt-5462d542b911741bd1b7ae88b2c47b24c6677248.tar.gz libvirt-5462d542b911741bd1b7ae88b2c47b24c6677248.tar.bz2 libvirt-5462d542b911741bd1b7ae88b2c47b24c6677248.zip |
* src/xml.c: added dump of physical vbd and read-only status
Daniel
-rw-r--r-- | ChangeLog | 4 | ||||
-rw-r--r-- | src/xml.c | 23 |
2 files changed, 27 insertions, 0 deletions
@@ -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 @@ -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 |