mirror of
https://github.com/libvirt/libvirt.git
synced 2025-02-25 18:55:26 -06:00
qemu: improve the error when try to undefine transient network
Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1315059 Signed-off-by: Shanzhi Yu <shyu@redhat.com>
This commit is contained in:
parent
47fdf9bc3a
commit
347035f959
@ -3222,6 +3222,12 @@ networkUndefine(virNetworkPtr net)
|
|||||||
if (virNetworkObjIsActive(network))
|
if (virNetworkObjIsActive(network))
|
||||||
active = true;
|
active = true;
|
||||||
|
|
||||||
|
if (!network->persistent) {
|
||||||
|
virReportError(VIR_ERR_OPERATION_INVALID, "%s",
|
||||||
|
_("can't undefine transient network"));
|
||||||
|
goto cleanup;
|
||||||
|
}
|
||||||
|
|
||||||
/* remove autostart link */
|
/* remove autostart link */
|
||||||
if (virNetworkDeleteConfig(driver->networkConfigDir,
|
if (virNetworkDeleteConfig(driver->networkConfigDir,
|
||||||
driver->networkAutostartDir,
|
driver->networkAutostartDir,
|
||||||
|
Loading…
Reference in New Issue
Block a user