mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-03 11:35:19 +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)
|
||||
goto cleanup;
|
||||
|
||||
if (virFileReadAll(from, VSH_MAX_XML_FILE, &buffer) < 0)
|
||||
if (virFileReadAll(from, VSH_MAX_XML_FILE, &buffer) < 0) {
|
||||
vshSaveLibvirtError();
|
||||
goto cleanup;
|
||||
}
|
||||
|
||||
port = virNetworkPortCreateXML(network, buffer, 0);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user