From: Michal Privoznik Date: Fri, 17 Sep 2021 07:58:54 +0000 (+0200) Subject: virsh: Provide local path completer for vol-download --file X-Git-Tag: v7.8.0-rc1~140 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=520e858a8d6c763cef54bbe67707345c37c7ebb1;p=thirdparty%2Flibvirt.git virsh: Provide local path completer for vol-download --file The vol-download command takes mandatory --file argument which points to a local (possibly non-existent) path. If the file exists then it's overwritten. Set the argument's completer so that self-test doesn't report it as missing. Signed-off-by: Michal Privoznik Reviewed-by: Ján Tomko --- diff --git a/tools/virsh-volume.c b/tools/virsh-volume.c index 103a9b9237..152f5b0dbe 100644 --- a/tools/virsh-volume.c +++ b/tools/virsh-volume.c @@ -779,11 +779,7 @@ static const vshCmdInfo info_vol_download[] = { static const vshCmdOptDef opts_vol_download[] = { VIRSH_COMMON_OPT_VOL_FULL, - {.name = "file", - .type = VSH_OT_DATA, - .flags = VSH_OFLAG_REQ, - .help = N_("file") - }, + VIRSH_COMMON_OPT_FILE(N_("file")), VIRSH_COMMON_OPT_POOL_OPTIONAL, {.name = "offset", .type = VSH_OT_INT,