提交 347035f9 编写于 作者: S Shanzhi Yu 提交者: Peter Krempa

qemu: improve the error when try to undefine transient network

Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1315059Signed-off-by: NShanzhi Yu <shyu@redhat.com>
上级 47fdf9bc
......@@ -3222,6 +3222,12 @@ networkUndefine(virNetworkPtr net)
if (virNetworkObjIsActive(network))
active = true;
if (!network->persistent) {
virReportError(VIR_ERR_OPERATION_INVALID, "%s",
_("can't undefine transient network"));
goto cleanup;
}
/* remove autostart link */
if (virNetworkDeleteConfig(driver->networkConfigDir,
driver->networkAutostartDir,
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册