]> www.infradead.org Git - users/sagi/nvme-cli.git/commitdiff
completions: add ocp hardware-component-log command
authorTokunori Ikegami <ikegami.t@gmail.com>
Sat, 7 Sep 2024 11:22:50 +0000 (20:22 +0900)
committerDaniel Wagner <wagi@monom.org>
Mon, 16 Sep 2024 15:19:25 +0000 (17:19 +0200)
The command lists component descriptions.

Signed-off-by: Tokunori Ikegami <ikegami.t@gmail.com>
completions/_nvme
completions/bash-nvme-completion.sh

index 6e80dd31b8aea2d3880895420bdaa774ee12e7a8..954b5c23b6308970beeaef82ae5b374dee206b67 100644 (file)
@@ -359,6 +359,24 @@ _nvme () {
                                _arguments '*:: :->subcmds'
                                _describe -t commands "nvme ocp set-error-injection options" _set_error_injection
                                ;;
+                       (hardware-component-log)
+                               local _hardware_component_log
+                               _hardware_component_log=(
+                               /dev/nvme':supply a device to use (required)'
+                               --comp-id=':component identifier'
+                               -i':alias for --comp-id'
+                               --list':list component descriptions'
+                               -v':alias for --list'
+                               --verbose':Increase the information detail in the output.'
+                               -v':alias for --verbose'
+                               --output-format=':Output format: normal|json|binary'
+                               -o ':alias for --output-format'
+                               --timeout=':value for timeout'
+                               -t ':alias for --timeout'
+                               )
+                               _arguments '*:: :->subcmds'
+                               _describe -t commands "nvme ocp hardware-component-log options" _hardware_component_log
+                               ;;
                        (*)
                                _files
                                ;;
@@ -2583,6 +2601,7 @@ _nvme () {
                        tcg-configuration-log':tcg configuration log'
                        get-error-injection':get error injection'
                        set-error-injection':set error injection'
+                       hardware-component-log':retrieve hardware component log'
                        )
                        _arguments '*:: :->subcmds'
                        _describe -t commands "nvme ocp options" _ocp
index 10f3ccde93132acbcd688cbc0007e38c457d2ad0..b7035093ffc9739259b63eac0600de5aa43c5c35 100644 (file)
@@ -1523,6 +1523,10 @@ plugin_ocp_opts () {
                opts+=" --data= -d --number= -n --no-uuid -N --type= -t \
                        --nrtdp= -r --verbose -v --output-format -o --timeout="
                        ;;
+               "hardware-component-log")
+               opts+=" --comp-id= -i --list -l --verbose -v \
+                       --output-format -o --timeout= -t"
+                       ;;
                "help")
                opts+=$NO_OPTS
                        ;;
@@ -1602,7 +1606,8 @@ _nvme_subcmds () {
                        set-dssd-power-state-feature get-dssd-power-state-feature \
                        telemetry-string-log set-telemetry-profile \
                        set-dssd-async-event-config get-dssd-async-event-config \
-                       get-error-injection set-error-injection"
+                       get-error-injection set-error-injection \
+                       hardware-component-log"
        )
 
        # Associative array mapping plugins to corresponding option completions