summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Veillard <veillard@redhat.com>2005-12-14 12:36:43 +0000
committerDaniel Veillard <veillard@redhat.com>2005-12-14 12:36:43 +0000
commit5462d542b911741bd1b7ae88b2c47b24c6677248 (patch)
treeca159c5f770f7c434632f9c001738298136b3e11
parent* src/xml.c: started to add block devices and interfaces descriptions (diff)
downloadlibvirt-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--ChangeLog4
-rw-r--r--src/xml.c23
2 files changed, 27 insertions, 0 deletions
diff --git a/ChangeLog b/ChangeLog
index 609d46887..a11a11a5f 100644
--- 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
diff --git a/src/xml.c b/src/xml.c
index 959effa59..15f69a7b6 100644
--- 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