From: Tokunori Ikegami Date: Sat, 14 Oct 2023 05:40:09 +0000 (+0900) Subject: completions: Add nvme-mi-recv nad nvme-mi-send commands completions X-Git-Tag: v2.7~120 X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=ad79a42e4f44bc258bdac20e00cd3fa8811a3917;p=users%2Fsagi%2Fnvme-cli.git completions: Add nvme-mi-recv nad nvme-mi-send commands completions Signed-off-by: Tokunori Ikegami --- diff --git a/completions/_nvme b/completions/_nvme index b12f1800..a9bd6e2b 100644 --- a/completions/_nvme +++ b/completions/_nvme @@ -102,6 +102,8 @@ _nvme () { 'virt-mgmt:submit a Virtualization Management command' 'rpmb:submit an NVMe RPMB command' 'show-topology:show subsystem topology' + 'nvme-mi-recv:send a NVMe-MI receive command' + 'nvme-mi-send:send a NVMe-MI send command' 'version:show the program version' 'ocp:OCP cloud SSD extensions' 'help:print brief descriptions of all nvme commands' @@ -1998,6 +2000,48 @@ _nvme () { _arguments '*:: :->subcmds' _describe -t commands "nvme show-topology options" _showtopology ;; + (nvme-mi-recv) + local _nvme_mi_recv + _nvme_mi_recv=( + --opcode=':NVMe-MI opcode to send' + -O':alias of --opcode' + --namespace-id=':value for nsid' + -n':alias of --namespace-id' + --data-len=':length for data buffer' + -l':alias of --data-len' + --nmimt':value for NVMe-MI message type' + -m':alias of --nmimt' + --nmd0':value for NVMe management request dword 0' + -0':alias of --nmd0' + --nmd1':value for NVMe management request dword 1' + -1':alias of --nmd1' + --input-file=':defaults to stdin; input for write (send direction)' + -i':alias for --input-file' + ) + _arguments '*:: :->subcmds' + _describe -t commands "nvme nvme-mi-recv options" _nvme_mi_recv + ;; + (nvme-mi-send) + local _nvme_mi_send + _nvme_mi_send=( + --opcode=':NVMe-MI opcode to send' + -O':alias of --opcode' + --namespace-id=':value for nsid' + -n':alias of --namespace-id' + --data-len=':length for data buffer' + -l':alias of --data-len' + --nmimt':value for NVMe-MI message type' + -m':alias of --nmimt' + --nmd0':value for NVMe management request dword 0' + -0':alias of --nmd0' + --nmd1':value for NVMe management request dword 1' + -1':alias of --nmd1' + --input-file=':defaults to stdin; input for write (send direction)' + -i':alias for --input-file' + ) + _arguments '*:: :->subcmds' + _describe -t commands "nvme nvme-mi-send options" _nvme_mi_send + ;; (version) local _version _version=( diff --git a/completions/bash-nvme-completion.sh b/completions/bash-nvme-completion.sh index f6f1fadc..2ae4a1e2 100644 --- a/completions/bash-nvme-completion.sh +++ b/completions/bash-nvme-completion.sh @@ -445,6 +445,14 @@ nvme_list_opts () { "show-topology") opts+=" --output-format= -o --verbose -v --ranking= -r" ;; + "nvme-mi-recv") + opts+=" --opcode= -O --namespace-id= -n --data-len= -l \ + --nmimt= -m --nmd0= -0 --nmd1= -1 --input-file= -i" + ;; + "nvme-mi-send") + opts+=" --opcode= -O --namespace-id= -n --data-len= -l \ + --nmimt= -m --nmd0= -0 --nmd1= -1 --input-file= -i" + ;; "version") opts+=$NO_OPTS ;; @@ -1469,7 +1477,8 @@ _nvme_subcmds () { show-hostnqn dir-receive dir-send virt-mgmt \ rpmb boot-part-log fid-support-effects-log \ supported-log-pages lockdown media-unit-stat-log \ - supported-cap-config-log dim show-topology list-endgrp" + supported-cap-config-log dim show-topology list-endgrp \ + nvme-mi-recv nvme-mi-send" # Add plugins: for plugin in "${!_plugin_subcmds[@]}"; do