提交 4d56d3c6 编写于 作者: M Mark McLoughlin

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.
上级 e2bd5431
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)) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册