ndctl, bash-completion: updates for --mode options
Vishal Verma
maintainerPATCH 1/1 ndctl, bash-completion: updates for --mode options
With the updates to --mode for create-namespace, deprecate the old names from bash completion. The man page removes mention of the old names, so remove them from the completion output as well to avoid confusion.
Add the new names into the mode filtering scheme alongside the old names so that the same filtering behaviour is seen regardless of whether a user supplies old or new names.
--- contrib/ndctl | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)
contrib/ndctl +4 -4
@@ -143,9 +143,9 @@ __ndctl_get_dimms() __ndctl_get_sector_sizes() { - if [[ "$mode_filter" == @(raw|memory) ]]; then + if [[ "$mode_filter" == @(raw|memory|fsdax) ]]; then echo "512 4096" - elif [[ "$mode_filter" == @(dax) ]]; then + elif [[ "$mode_filter" == @(dax|devdax) ]]; then return else echo "512 520 528 4096 4104 4160 4224"
@@ -183,12 +183,12 @@ __ndctl_comp_options() ;; --type) opts="pmem blk" - if [[ "$mode_filter" == @(dax|memory) ]]; then + if [[ "$mode_filter" == @(dax|memory|fsdax|devdax) ]]; then opts="pmem" fi ;; --mode) - opts="raw sector fsdax devdax memory dax" + opts="raw sector fsdax devdax" if [[ "$type_filter" == "blk" ]]; then opts="raw sector" fi
Signature · 6 lines
2.14.3 _______________________________________________ Linux-nvdimm mailing list [email protected] https://lists.01.org/mailman/listinfo/linux-nvdimm
Quoted 7 lines · Vishal Verma
With the updates to --mode for create-namespace, deprecate the old names from bash completion. The man page removes mention of the old names, so remove them from the completion output as well to avoid confusion.
Add the new names into the mode filtering scheme alongside the old names so that the same filtering behaviour is seen regardless of whether a user supplies old or new names.
Thanks Vishal, applied.
_______________________________________________
Linux-nvdimm mailing list
[email protected]
https://lists.01.org/mailman/listinfo/linux-nvdimm