mirror of https://gitee.com/openkylin/libvirt.git
virsh-snapshot: Use the mutually exclusive params macro in cmdSnapshotEdit
This commit is contained in:
parent
4baf00fc30
commit
29882a054e
|
@ -561,11 +561,7 @@ cmdSnapshotEdit(vshControl *ctl, const vshCmd *cmd)
|
||||||
bool rename_okay = vshCommandOptBool(cmd, "rename");
|
bool rename_okay = vshCommandOptBool(cmd, "rename");
|
||||||
bool clone_okay = vshCommandOptBool(cmd, "clone");
|
bool clone_okay = vshCommandOptBool(cmd, "clone");
|
||||||
|
|
||||||
if (rename_okay && clone_okay) {
|
VSH_EXCLUSIVE_OPTIONS_EXPR("rename", rename_okay, "clone", clone_okay)
|
||||||
vshError(ctl, "%s",
|
|
||||||
_("--rename and --clone are mutually exclusive"));
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (vshCommandOptBool(cmd, "current") &&
|
if (vshCommandOptBool(cmd, "current") &&
|
||||||
vshCommandOptBool(cmd, "snapshotname"))
|
vshCommandOptBool(cmd, "snapshotname"))
|
||||||
|
|
Loading…
Reference in New Issue