From c2e19ef865455d23b5bfdf4d95f284f4113cdc00 Mon Sep 17 00:00:00 2001 From: Arunpandian J Date: Wed, 17 May 2023 18:53:33 +0530 Subject: [PATCH] completions: Add bash completion for OCP Device capability(LID: 0xC4) log page Signed-off-by: Arunpandian J --- completions/_nvme | 11 +++++++++++ completions/bash-nvme-completion.sh | 5 ++++- 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/completions/_nvme b/completions/_nvme index c820f5c7..49736f58 100644 --- a/completions/_nvme +++ b/completions/_nvme @@ -227,6 +227,16 @@ _nvme () { _arguments '*:: :->subcmds' _describe -t commands "nvme ocp vs-fw-activate-history options" _vs_fw_activate_history ;; + (device-capability-log) + local _device_capability_log + _device_capability_log=( + /dev/nvme':supply a device to use (required)' + --output-format=':Output format: normal|json|binary' + -o':alias for --output-format' + ) + _arguments '*:: :->subcmds' + _describe -t commands "nvme ocp device-capability-log options" _device_capability_log + ;; (*) _files ;; @@ -1980,6 +1990,7 @@ _nvme () { eol-plp-failure-mode':Define EOL or PLP circuitry failure mode' 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' ) _arguments '*:: :->subcmds' _describe -t commands "nvme ocp options" _ocp diff --git a/completions/bash-nvme-completion.sh b/completions/bash-nvme-completion.sh index bafbcdc8..8f451ff9 100644 --- a/completions/bash-nvme-completion.sh +++ b/completions/bash-nvme-completion.sh @@ -1343,6 +1343,9 @@ plugin_ocp_opts () { opts+=" --no-uuid -n" ;; "vs-fw-activate-history") + opts+=" --output-format= -o" + ;; + "device-capability-log") opts+=" --output-format= -o" ;; "help") @@ -1413,7 +1416,7 @@ _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" + vs-fw-activate-history device-capability-log" ) # Associative array mapping plugins to coresponding option completions -- 2.49.0