From: Vishal Verma <vishal.l.verma@intel.com>
To: Dan Williams <dan.j.williams@intel.com>
Cc: linux-nvdimm@lists.01.org
Subject: Re: [ndctl PATCH 4/9] ndctl, list: allow limiting namespace listing
Date: Mon, 27 Jun 2016 13:28:12 -0600 [thread overview]
Message-ID: <20160627192812.GD20767@omniknight.lm.intel.com> (raw)
In-Reply-To: <146698348937.40541.3876891950806088867.stgit@dwillia2-desk3.amr.corp.intel.com>
On 06/26, Dan Williams wrote:
> In addition to filtering by bus, dimm, and/or region, introduce
> -n/--namespace to limit the listing to the given namespace.
>
> Signed-off-by: Dan Williams <dan.j.williams@intel.com>
> ---
> Documentation/ndctl-list.txt | 6 ++++++
> ndctl/builtin-list.c | 6 ++++++
> util/filter.c | 21 +++++++++++++++++++++
> util/filter.h | 2 ++
> 4 files changed, 35 insertions(+)
>
This needs a bash completion update as follows (feel free to squash in
or keep separatley..):
>From b6d09ff03b7ed16efdc4169aec0442d5c32053bd Mon Sep 17 00:00:00 2001
From: Vishal Verma <vishal.l.verma@intel.com>
Date: Mon, 27 Jun 2016 13:22:58 -0600
Subject: [PATCH] ndctl: bash completion updates for the --namespace= filter
Add completion for the new --namespace= filter.
This will list idle namespaces for completion. It could possibly be made
smarter by checking if a '--idle' or '-i' has been specified on the
command line so far, but maybe that's a bit confusing for the user?
For now, enable the simpler path of listing everything for completion.
Signed-off-by: Vishal Verma <vishal.l.verma@intel.com>
---
contrib/ndctl | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/contrib/ndctl b/contrib/ndctl
index 5a7455f..b7a82fc 100755
--- a/contrib/ndctl
+++ b/contrib/ndctl
@@ -91,7 +91,7 @@ __ndctlcomp()
COMPREPLY=( $( compgen -W "$1" -- "$2" ) )
for cword in "${COMPREPLY[@]}"; do
- if [[ "$cword" == @(--bus|--region|--type|--mode|--size|--dimm|--reconfig|--uuid|--name|--sector-size|--map) ]]; then
+ if [[ "$cword" == @(--bus|--region|--type|--mode|--size|--dimm|--reconfig|--uuid|--name|--sector-size|--map|--namespace) ]]; then
COMPREPLY[$i]="${cword}="
else
COMPREPLY[$i]="${cword} "
@@ -146,6 +146,9 @@ __ndctl_comp_options()
--dimm)
opts=$(__ndctl_get_dimms)
;;
+ --namespace)
+ opts=$(__ndctl_get_ns -i)
+ ;;
--reconfig)
# It is ok to reconfig disabled namespaces
opts=$(__ndctl_get_ns -i)
--
2.5.5
_______________________________________________
Linux-nvdimm mailing list
Linux-nvdimm@lists.01.org
https://lists.01.org/mailman/listinfo/linux-nvdimm
next prev parent reply other threads:[~2016-06-27 19:29 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-06-26 23:24 [ndctl PATCH 0/9] updates for vmalloc-based nfit_test and device-dax Dan Williams
2016-06-26 23:24 ` [ndctl PATCH 1/9] ndctl: deprecate pcommit Dan Williams
2016-06-26 23:24 ` [ndctl PATCH 2/9] test, libndctl: invalidate dax info blocks before reuse Dan Williams
2016-06-26 23:24 ` [ndctl PATCH 3/9] ndctl, list: list device-dax instances beneath a namespace Dan Williams
2016-06-26 23:24 ` [ndctl PATCH 4/9] ndctl, list: allow limiting namespace listing Dan Williams
2016-06-27 19:28 ` Vishal Verma [this message]
2016-06-27 19:38 ` Dan Williams
2016-06-26 23:24 ` [ndctl PATCH 5/9] ndctl: add libs dependency to spec file Dan Williams
2016-06-26 23:24 ` [ndctl PATCH 6/9] ndctl, create-namespace: fix blk-namepsaces vs device-dax Dan Williams
2016-06-26 23:25 ` [ndctl PATCH 7/9] ndctl, create-namespace: fix device-dax vs --map= Dan Williams
2016-06-26 23:25 ` [ndctl PATCH 8/9] test, libndctl: move pfn + dax configurations to a destructive test Dan Williams
2016-06-26 23:25 ` [ndctl PATCH 9/9] test, libndctl: kill some dead code Dan Williams
2016-06-27 11:37 ` [ndctl PATCH 0/9] updates for vmalloc-based nfit_test and device-dax Yigal Korman
2016-06-27 23:04 ` Vishal Verma
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20160627192812.GD20767@omniknight.lm.intel.com \
--to=vishal.l.verma@intel.com \
--cc=dan.j.williams@intel.com \
--cc=linux-nvdimm@lists.01.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.