]> www.infradead.org Git - users/sagi/nvme-cli.git/commitdiff
completions: Add bash completion for DSSD Power state feature(FID: C7h)
authorArunpandian J <arun.j@samsung.com>
Wed, 23 Aug 2023 08:55:04 +0000 (14:25 +0530)
committerDaniel Wagner <wagi@monom.org>
Tue, 5 Sep 2023 05:30:37 +0000 (07:30 +0200)
Signed-off-by: Arunpandian J <arun.j@samsung.com>
completions/_nvme
completions/bash-nvme-completion.sh

index 3c8dd47a7b5d35be8046a84b73adfa874eb82179..8a06a41b06920f8a3add99af64f004bd0f3c28ca 100644 (file)
@@ -237,6 +237,20 @@ _nvme () {
                                _arguments '*:: :->subcmds'
                                _describe -t commands "nvme ocp device-capability-log options" _device_capability_log
                                ;;
+                       (set-dssd-power-state-feature)
+                               local _set_dssd_power_state_feature
+                               _set_dssd_power_state_feature=(
+                               /dev/nvme':supply a device to use (required)'
+                               --power-state=':DSSD Power State to set in watts'
+                               -p':alias for --power-state'
+                               --save':Specifies that the controller shall save the attribute'
+                               -s':alias for --save'
+                               --no-uuid':Skip UUID index search'
+                               -n':alias for --no-uuid'
+                               )
+                               _arguments '*:: :->subcmds'
+                               _describe -t commands "nvme ocp set-dssd-power-state-feature options" _set_dssd_power_state_feature
+                               ;;
                        (*)
                                _files
                                ;;
@@ -1993,6 +2007,7 @@ _nvme () {
                        clear-pcie-correctable-error-counters':Clear PCIe correctable error counters'
                        vs-fw-activate-history':Get firmware activation history log'
                        device-capability-log':Get Device capability log'
+                       set-dssd-power-state-feature':Set DSSD Power State'
                        )
                        _arguments '*:: :->subcmds'
                        _describe -t commands "nvme ocp options" _ocp
index 223f9b50a8e1ad7935d301f726841a262bd17f2b..3ec8e4c939452026099e746af01f8cd68216dc05 100644 (file)
@@ -1348,6 +1348,9 @@ plugin_ocp_opts () {
                "device-capability-log")
                opts+=" --output-format= -o"
                        ;;
+               "set-dssd-power-state-feature")
+               opts+=" --power-state= -p --no-uuid -n --save -s"
+                       ;;
                "help")
                opts+=$NO_OPTS
                        ;;
@@ -1416,7 +1419,8 @@ _nvme_subcmds () {
                        set-latency-monitor-feature internal-log \
                        clear-fw-activate-history eol-plp-failure-mode \
                        clear-pcie-correctable-error-counters \
-                       vs-fw-activate-history device-capability-log"
+                       vs-fw-activate-history device-capability-log \
+                       set-dssd-power-state-feature"
        )
 
        # Associative array mapping plugins to coresponding option completions