From: Lin Ma Date: Fri, 11 Sep 2020 07:13:18 +0000 (+0800) Subject: virsh: limit completion of checkpoint-{create, delete} to active domains X-Git-Tag: v6.8.0-rc1~156 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=60719bedbcbb05e7d0f6553b6ad9d51bf74bc155;p=thirdparty%2Flibvirt.git virsh: limit completion of checkpoint-{create, delete} to active domains Signed-off-by: Lin Ma Reviewed-by: Michal Privoznik --- diff --git a/tools/virsh-checkpoint.c b/tools/virsh-checkpoint.c index c4ff863802..33e70515ad 100644 --- a/tools/virsh-checkpoint.c +++ b/tools/virsh-checkpoint.c @@ -90,7 +90,7 @@ static const vshCmdInfo info_checkpoint_create[] = { }; static const vshCmdOptDef opts_checkpoint_create[] = { - VIRSH_COMMON_OPT_DOMAIN_FULL(0), + VIRSH_COMMON_OPT_DOMAIN_FULL(VIR_CONNECT_LIST_DOMAINS_ACTIVE), {.name = "xmlfile", .type = VSH_OT_STRING, .help = N_("domain checkpoint XML") @@ -201,7 +201,7 @@ static const vshCmdInfo info_checkpoint_create_as[] = { }; static const vshCmdOptDef opts_checkpoint_create_as[] = { - VIRSH_COMMON_OPT_DOMAIN_FULL(0), + VIRSH_COMMON_OPT_DOMAIN_FULL(VIR_CONNECT_LIST_DOMAINS_ACTIVE), {.name = "name", .type = VSH_OT_STRING, .help = N_("name of checkpoint") @@ -1015,7 +1015,8 @@ static const vshCmdInfo info_checkpoint_delete[] = { }; static const vshCmdOptDef opts_checkpoint_delete[] = { - VIRSH_COMMON_OPT_DOMAIN_FULL(VIR_CONNECT_LIST_DOMAINS_HAS_CHECKPOINT), + VIRSH_COMMON_OPT_DOMAIN_FULL(VIR_CONNECT_LIST_DOMAINS_HAS_CHECKPOINT | + VIR_CONNECT_LIST_DOMAINS_ACTIVE), {.name = "checkpointname", .type = VSH_OT_STRING, .help = N_("checkpoint name"),