]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
virsh: Provide local path completer for vol-download --file
authorMichal Privoznik <mprivozn@redhat.com>
Fri, 17 Sep 2021 07:58:54 +0000 (09:58 +0200)
committerMichal Privoznik <mprivozn@redhat.com>
Tue, 21 Sep 2021 08:20:41 +0000 (10:20 +0200)
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 <mprivozn@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
tools/virsh-volume.c

index 103a9b9237d8b3d59f17ee694c665539957154d6..152f5b0dbe224b550de2bfe2412799fb45f72109 100644 (file)
@@ -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,