mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-08-27 19:11:16 +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>
|
Thu Jul 6 10:32:14 CEST 2006 Daniel Veillard <veillard@redhat.com>
|
||||||
|
|
||||||
* src/xend_internal.c: fixed xenDaemonOpen() to try both unix and
|
* 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 */
|
/* analyze of the devices */
|
||||||
obj = xmlXPathEval(BAD_CAST "/domain/devices/disk", ctxt);
|
obj = xmlXPathEval(BAD_CAST "/domain/devices/disk", ctxt);
|
||||||
if ((obj == NULL) || (obj->type != XPATH_NODESET) ||
|
if ((obj != NULL) && (obj->type == XPATH_NODESET) &&
|
||||||
(obj->nodesetval == NULL) || (obj->nodesetval->nodeNr < 1)) {
|
(obj->nodesetval != NULL) && (obj->nodesetval->nodeNr >= 0)) {
|
||||||
virXMLError(VIR_ERR_NO_DEVICE, nam, 0);
|
|
||||||
goto error;
|
|
||||||
}
|
|
||||||
for (i = 0; i < obj->nodesetval->nodeNr; i++) {
|
for (i = 0; i < obj->nodesetval->nodeNr; i++) {
|
||||||
virBufferAdd(&buf, "(device ", 8);
|
virBufferAdd(&buf, "(device ", 8);
|
||||||
res = virDomainParseXMLDiskDesc(obj->nodesetval->nodeTab[i], &buf);
|
res = virDomainParseXMLDiskDesc(obj->nodesetval->nodeTab[i], &buf);
|
||||||
@ -957,7 +954,9 @@ virDomainParseXMLDesc(const char *xmldesc, char **name)
|
|||||||
}
|
}
|
||||||
virBufferAdd(&buf, ")", 1);
|
virBufferAdd(&buf, ")", 1);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
xmlXPathFreeObject(obj);
|
xmlXPathFreeObject(obj);
|
||||||
|
|
||||||
obj = xmlXPathEval(BAD_CAST "/domain/devices/interface", ctxt);
|
obj = xmlXPathEval(BAD_CAST "/domain/devices/interface", ctxt);
|
||||||
if ((obj != NULL) && (obj->type == XPATH_NODESET) &&
|
if ((obj != NULL) && (obj->type == XPATH_NODESET) &&
|
||||||
(obj->nodesetval != NULL) && (obj->nodesetval->nodeNr >= 0)) {
|
(obj->nodesetval != NULL) && (obj->nodesetval->nodeNr >= 0)) {
|
||||||
|
Loading…
Reference in New Issue
Block a user