]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
rbd: add missing switch arguments for recognition by get_command_spec() 44669/head
authorIlya Dryomov <idryomov@gmail.com>
Wed, 19 Jan 2022 11:54:23 +0000 (12:54 +0100)
committerIlya Dryomov <idryomov@gmail.com>
Wed, 19 Jan 2022 15:12:09 +0000 (16:12 +0100)
commite1b4811bc324236892e43a6bb841d6278fe1584e
tree53998bca33913299dff9eb531b3ee206490360dd
parent51a347456dead2c327a08926a7042bfa685b397c
rbd: add missing switch arguments for recognition by get_command_spec()

Currently this

  $ rbd --all children img

doesn't work, while this

  $ rbd children --all img

or this

  $ rbd children img --all

does.  The issue is that -a/--all isn't on the list of known switch
arguments.  The "rbd children" example may seem contrived but for more
complicated commands such as "rbd device map" mixing switches and
positional arguments occurs naturally:

  $ rbd device --device-type nbd --options try-netlink --show-cookie map img

Fixes: https://tracker.ceph.com/issues/53935
Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
src/tools/rbd/ArgumentTypes.h
src/tools/rbd/action/Children.cc
src/tools/rbd/action/Device.cc
src/tools/rbd/action/Diff.cc
src/tools/rbd/action/Export.cc
src/tools/rbd/action/Migration.cc
src/tools/rbd/action/Nbd.cc
src/tools/rbd/action/Trash.cc
src/tools/rbd/action/TrashPurgeSchedule.cc
src/tools/rbd/action/Wnbd.cc