]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
virsh: volume: Mark optional 'pool' argument as 'positional'
authorPeter Krempa <pkrempa@redhat.com>
Thu, 14 Mar 2024 14:34:03 +0000 (15:34 +0100)
committerPeter Krempa <pkrempa@redhat.com>
Tue, 2 Apr 2024 12:24:29 +0000 (14:24 +0200)
Annotate arguments which can be unintentionally parsed positionally.
(See previous commits for explanation.)

The pool name is optional but in all cases it can be promoted to an
optional positional argument so that it can be properly aligned with the
expectations of the parser.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
tools/virsh-volume.c

index 8794126f21dd2950ba096e2c42e084c23e4d7743..7e6c6d5ef53a70e96f31b6eee7f3ad9eee21000c 100644 (file)
@@ -49,6 +49,7 @@
 #define VIRSH_COMMON_OPT_POOL_OPTIONAL \
     {.name = "pool", \
      .type = VSH_OT_STRING, \
+     .positional = true, \
      .help = N_("pool name or uuid"), \
      .completer = virshStoragePoolNameCompleter, \
      .completer_flags = VIR_CONNECT_LIST_STORAGE_POOLS_ACTIVE, \