From 808160917dde1c08dbf81f6a270ddfbfb5557c0e Mon Sep 17 00:00:00 2001 From: Arunpandian J Date: Wed, 23 Aug 2023 14:25:04 +0530 Subject: [PATCH] completions: Add bash completion for DSSD Power state feature(FID: C7h) Signed-off-by: Arunpandian J --- completions/_nvme | 15 +++++++++++++++ completions/bash-nvme-completion.sh | 6 +++++- 2 files changed, 20 insertions(+), 1 deletion(-) diff --git a/completions/_nvme b/completions/_nvme index 3c8dd47a7..8a06a41b0 100644 --- a/completions/_nvme +++ b/completions/_nvme @@ -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 diff --git a/completions/bash-nvme-completion.sh b/completions/bash-nvme-completion.sh index 223f9b50a..3ec8e4c93 100644 --- a/completions/bash-nvme-completion.sh +++ b/completions/bash-nvme-completion.sh @@ -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