提交 fe69656e 编写于 作者: P Peter Krempa

virsh-snapshot: Reject --no-metadata together with --print-xml

Manual for "virsh snapshot-create-as" states that --no-metadata and
--print-xml are incompatible. Honor this detail in the code.
上级 02b0d3f3
......@@ -412,8 +412,14 @@ cmdSnapshotCreateAs(vshControl *ctl, const vshCmd *cmd)
unsigned int flags = 0;
const vshCmdOpt *opt = NULL;
if (vshCommandOptBool(cmd, "no-metadata"))
if (vshCommandOptBool(cmd, "no-metadata")) {
if (vshCommandOptBool(cmd, "print-xml")) {
vshError(ctl, "%s",
_("--print-xml is incompatible with --no-metadata"));
return false;
}
flags |= VIR_DOMAIN_SNAPSHOT_CREATE_NO_METADATA;
}
if (vshCommandOptBool(cmd, "halt"))
flags |= VIR_DOMAIN_SNAPSHOT_CREATE_HALT;
if (vshCommandOptBool(cmd, "disk-only"))
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册