提交 53a2f725 编写于 作者: M Matthias Bolte

phyp: Verify that domain XML contains at least one disk element

phypBuildLpar expects that at least one disk element is provided.
上级 091075a3
......@@ -3715,13 +3715,17 @@ phypBuildLpar(virConnectPtr conn, virDomainDefPtr def)
goto err;
}
if (def->ndisks > 0) {
if (!def->disks[0]->src) {
PHYP_ERROR(VIR_ERR_XML_ERROR,"%s",
_("Field \"<src>\" under \"<disk>\" on the domain XML file is "
"missing."));
goto err;
}
if (def->ndisks < 1) {
PHYP_ERROR(VIR_ERR_XML_ERROR, "%s",
_("Domain XML must contain at least one \"<disk>\" element."));
goto err;
}
if (!def->disks[0]->src) {
PHYP_ERROR(VIR_ERR_XML_ERROR,"%s",
_("Field \"<src>\" under \"<disk>\" on the domain XML file is "
"missing."));
goto err;
}
virBufferAddLit(&buf, "mksyscfg");
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册