mirror of
https://github.com/libvirt/libvirt.git
synced 2025-02-25 18:55:26 -06:00
phyp: Verify that domain XML contains at least one disk element
phypBuildLpar expects that at least one disk element is provided.
This commit is contained in:
parent
091075a32b
commit
53a2f725ad
@ -3715,13 +3715,17 @@ phypBuildLpar(virConnectPtr conn, virDomainDefPtr def)
|
|||||||
goto err;
|
goto err;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (def->ndisks > 0) {
|
if (def->ndisks < 1) {
|
||||||
if (!def->disks[0]->src) {
|
PHYP_ERROR(VIR_ERR_XML_ERROR, "%s",
|
||||||
PHYP_ERROR(VIR_ERR_XML_ERROR,"%s",
|
_("Domain XML must contain at least one \"<disk>\" element."));
|
||||||
_("Field \"<src>\" under \"<disk>\" on the domain XML file is "
|
goto err;
|
||||||
"missing."));
|
}
|
||||||
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");
|
virBufferAddLit(&buf, "mksyscfg");
|
||||||
|
Loading…
Reference in New Issue
Block a user