Skip to content

Commit 741d2e5

Browse files
ikegami-tigaw
authored andcommitted
completions: add and fix io-mgmt-recv and io-mgmt-send commands
Also fixed get-reg and set-reg commands completions. Signed-off-by: Tokunori Ikegami <[email protected]>
1 parent 79ece77 commit 741d2e5

File tree

2 files changed

+16
-6
lines changed

2 files changed

+16
-6
lines changed

completions/_nvme

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2591,7 +2591,7 @@ _nvme () {
25912591
-t':alias of --timeout'
25922592
)
25932593
_arguments '*:: :->subcmds'
2594-
_describe -t commands "nvme set-reg options" _io_mgmt_recv
2594+
_describe -t commands "nvme io-mgmt-recv-reg options" _io_mgmt_recv
25952595
;;
25962596
(io-mgmt-send)
25972597
local _io_mgmt_send
@@ -2615,7 +2615,7 @@ _nvme () {
26152615
-t':alias of --timeout'
26162616
)
26172617
_arguments '*:: :->subcmds'
2618-
_describe -t commands "nvme set-reg options" _io_mgmt_send
2618+
_describe -t commands "nvme io-mgmt-send options" _io_mgmt_send
26192619
;;
26202620
(mgmt-addr-list-log)
26212621
local _mal_log

completions/bash-nvme-completion.sh

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -465,18 +465,28 @@ nvme_list_opts () {
465465
--nmimt= -m --nmd0= -0 --nmd1= -1 --input-file= -i"
466466
;;
467467
"get-reg")
468-
opts+=" --offset, -O --human-readable -H --cap --vs --cmbloc \
468+
opts+=" --offset= -O --human-readable -H --cap --vs --cmbloc \
469469
--cmbsz --bpinfo --cmbsts --cmbebs --cmbswtp --crto \
470470
--pmrcap --pmrsts --pmrebs --pmrswtp --intms --intmc \
471471
--cc --csts --nssr --aqa --asq --acq --bprsel --bpmbl \
472472
--cmbmsc --nssd --pmrctl --pmrmscl --pmrmscu \
473473
--output-format -o --verbose -v --timeout= -t"
474474
;;
475475
"set-reg")
476-
opts+=" --offset, -O --value= -V --mmio32 -m --intms= --intmc= \
476+
opts+=" --offset= -O --value= -V --mmio32 -m --intms= --intmc= \
477477
--cc= --csts= --nssr= --aqa= --asq= --acq= --bprsel= \
478478
--bpmbl= --cmbmsc= --nssd= --pmrctl= --pmrmscl= \
479-
--pmrmscu= --output-format= -o --verbose= -v \
479+
--pmrmscu= --output-format= -o --verbose -v \
480+
--timeout= -t"
481+
;;
482+
"io-mgmt-recv")
483+
opts+=" --namespace-id= -n --mos= -s --mo= -m --data= -d \
484+
--data-len= -l --output-format= -o --verbose -v \
485+
--timeout= -t"
486+
;;
487+
"io-mgmt-send")
488+
opts+=" --namespace-id= -n --mos= -s --mo= -m --data= -d \
489+
--data-len= -l --output-format= -o --verbose -v \
480490
--timeout= -t"
481491
;;
482492
"mgmt-addr-list-log")
@@ -1686,7 +1696,7 @@ _nvme_subcmds () {
16861696
supported-cap-config-log dim show-topology list-endgrp \
16871697
nvme-mi-recv nvme-mi-send get-reg set-reg mgmt-addr-list-log \
16881698
rotational-media-info-log changed-alloc-ns-list-log \
1689-
dispersed-ns-participating-nss-log"
1699+
io-mgmt-recv io-mgmt-send dispersed-ns-participating-nss-log"
16901700

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

0 commit comments

Comments
 (0)