mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-23 13:05:27 +00:00
Wed Jul 5 17:11:32 IST 2006 Mark McLoughlin <markmc@redhat.com>
* xml.c: allow a <domain> to not have any <disk> devices - e.g. when using an NFS root.
This commit is contained in:
parent
e2bd543163
commit
4d56d3c638
@ -1,3 +1,8 @@
|
||||
Wed Jul 5 17:11:32 IST 2006 Mark McLoughlin <markmc@redhat.com>
|
||||
|
||||
* xml.c: allow a <domain> to not have any <disk> devices - e.g.
|
||||
when using an NFS root.
|
||||
|
||||
Thu Jul 6 10:32:14 CEST 2006 Daniel Veillard <veillard@redhat.com>
|
||||
|
||||
* src/xend_internal.c: fixed xenDaemonOpen() to try both unix and
|
||||
|
@ -944,11 +944,8 @@ virDomainParseXMLDesc(const char *xmldesc, char **name)
|
||||
|
||||
/* analyze of the devices */
|
||||
obj = xmlXPathEval(BAD_CAST "/domain/devices/disk", ctxt);
|
||||
if ((obj == NULL) || (obj->type != XPATH_NODESET) ||
|
||||
(obj->nodesetval == NULL) || (obj->nodesetval->nodeNr < 1)) {
|
||||
virXMLError(VIR_ERR_NO_DEVICE, nam, 0);
|
||||
goto error;
|
||||
}
|
||||
if ((obj != NULL) && (obj->type == XPATH_NODESET) &&
|
||||
(obj->nodesetval != NULL) && (obj->nodesetval->nodeNr >= 0)) {
|
||||
for (i = 0; i < obj->nodesetval->nodeNr; i++) {
|
||||
virBufferAdd(&buf, "(device ", 8);
|
||||
res = virDomainParseXMLDiskDesc(obj->nodesetval->nodeTab[i], &buf);
|
||||
@ -957,7 +954,9 @@ virDomainParseXMLDesc(const char *xmldesc, char **name)
|
||||
}
|
||||
virBufferAdd(&buf, ")", 1);
|
||||
}
|
||||
}
|
||||
xmlXPathFreeObject(obj);
|
||||
|
||||
obj = xmlXPathEval(BAD_CAST "/domain/devices/interface", ctxt);
|
||||
if ((obj != NULL) && (obj->type == XPATH_NODESET) &&
|
||||
(obj->nodesetval != NULL) && (obj->nodesetval->nodeNr >= 0)) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user