Skip to content

Commit

Permalink
completions: add and fix io-mgmt-recv and io-mgmt-send commands
Browse files Browse the repository at this point in the history
Also fixed get-reg and set-reg commands completions.

Signed-off-by: Tokunori Ikegami <[email protected]>
  • Loading branch information
ikegami-t authored and igaw committed Feb 10, 2025
1 parent 79ece77 commit 741d2e5
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 6 deletions.
4 changes: 2 additions & 2 deletions completions/_nvme
Original file line number Diff line number Diff line change
Expand Up @@ -2591,7 +2591,7 @@ _nvme () {
-t':alias of --timeout'
)
_arguments '*:: :->subcmds'
_describe -t commands "nvme set-reg options" _io_mgmt_recv
_describe -t commands "nvme io-mgmt-recv-reg options" _io_mgmt_recv
;;
(io-mgmt-send)
local _io_mgmt_send
Expand All @@ -2615,7 +2615,7 @@ _nvme () {
-t':alias of --timeout'
)
_arguments '*:: :->subcmds'
_describe -t commands "nvme set-reg options" _io_mgmt_send
_describe -t commands "nvme io-mgmt-send options" _io_mgmt_send
;;
(mgmt-addr-list-log)
local _mal_log
Expand Down
18 changes: 14 additions & 4 deletions completions/bash-nvme-completion.sh
Original file line number Diff line number Diff line change
Expand Up @@ -465,18 +465,28 @@ nvme_list_opts () {
--nmimt= -m --nmd0= -0 --nmd1= -1 --input-file= -i"
;;
"get-reg")
opts+=" --offset, -O --human-readable -H --cap --vs --cmbloc \
opts+=" --offset= -O --human-readable -H --cap --vs --cmbloc \
--cmbsz --bpinfo --cmbsts --cmbebs --cmbswtp --crto \
--pmrcap --pmrsts --pmrebs --pmrswtp --intms --intmc \
--cc --csts --nssr --aqa --asq --acq --bprsel --bpmbl \
--cmbmsc --nssd --pmrctl --pmrmscl --pmrmscu \
--output-format -o --verbose -v --timeout= -t"
;;
"set-reg")
opts+=" --offset, -O --value= -V --mmio32 -m --intms= --intmc= \
opts+=" --offset= -O --value= -V --mmio32 -m --intms= --intmc= \
--cc= --csts= --nssr= --aqa= --asq= --acq= --bprsel= \
--bpmbl= --cmbmsc= --nssd= --pmrctl= --pmrmscl= \
--pmrmscu= --output-format= -o --verbose= -v \
--pmrmscu= --output-format= -o --verbose -v \
--timeout= -t"
;;
"io-mgmt-recv")
opts+=" --namespace-id= -n --mos= -s --mo= -m --data= -d \
--data-len= -l --output-format= -o --verbose -v \
--timeout= -t"
;;
"io-mgmt-send")
opts+=" --namespace-id= -n --mos= -s --mo= -m --data= -d \
--data-len= -l --output-format= -o --verbose -v \
--timeout= -t"
;;
"mgmt-addr-list-log")
Expand Down Expand Up @@ -1686,7 +1696,7 @@ _nvme_subcmds () {
supported-cap-config-log dim show-topology list-endgrp \
nvme-mi-recv nvme-mi-send get-reg set-reg mgmt-addr-list-log \
rotational-media-info-log changed-alloc-ns-list-log \
dispersed-ns-participating-nss-log"
io-mgmt-recv io-mgmt-send dispersed-ns-participating-nss-log"

# Add plugins:
for plugin in "${!_plugin_subcmds[@]}"; do
Expand Down

0 comments on commit 741d2e5

Please sign in to comment.