mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-18 10:35:20 +00:00
virsh: net-port-create: log errors for non-existent xml file
Signed-off-by: Lin Ma <lma@suse.de> Signed-off-by: Michal Privoznik <mprivozn@redhat.com> Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
This commit is contained in:
parent
80fcfab9ce
commit
29f6ba3f18
@ -1506,8 +1506,10 @@ cmdNetworkPortCreate(vshControl *ctl, const vshCmd *cmd)
|
|||||||
if (vshCommandOptStringReq(ctl, cmd, "file", &from) < 0)
|
if (vshCommandOptStringReq(ctl, cmd, "file", &from) < 0)
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
|
|
||||||
if (virFileReadAll(from, VSH_MAX_XML_FILE, &buffer) < 0)
|
if (virFileReadAll(from, VSH_MAX_XML_FILE, &buffer) < 0) {
|
||||||
|
vshSaveLibvirtError();
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
|
}
|
||||||
|
|
||||||
port = virNetworkPortCreateXML(network, buffer, 0);
|
port = virNetworkPortCreateXML(network, buffer, 0);
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user