mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-03 03:25:20 +00:00
* src/xml.c: added dump of physical vbd and read-only status
Daniel
This commit is contained in:
parent
3447b53fea
commit
5462d542b9
@ -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>
|
Wed Dec 14 12:20:06 CET 2005 Daniel Veillard <veillard@redhat.com>
|
||||||
|
|
||||||
* src/xml.c: started to add block devices and interfaces descriptions
|
* src/xml.c: started to add block devices and interfaces descriptions
|
||||||
|
23
src/xml.c
23
src/xml.c
@ -196,6 +196,29 @@ virDomainGetXMLDevice(virDomainPtr domain, virBufferPtr buf, long dev) {
|
|||||||
virBufferVSprintf(buf, " <target dev='%s'/>\n", val);
|
virBufferVSprintf(buf, " <target dev='%s'/>\n", val);
|
||||||
free(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);
|
virBufferAdd(buf, " </disk>\n", 12);
|
||||||
} else {
|
} else {
|
||||||
TODO
|
TODO
|
||||||
|
Loading…
Reference in New Issue
Block a user