> -----Original Message-----
> From: Dan Williams [mailto:[email protected]]
> Sent: Wednesday, April 25, 2018 11:11 PM
> To: Qi, Fuli/斉 福利 <[email protected]>
> Cc: linux-nvdimm <[email protected]>
> Subject: Re: [PATCH] ndctl, filter: fix "keyword 'all' is ignored" in
> util_<obj>_filter()
>
> On Wed, Apr 25, 2018 at 12:38 AM, QI Fuli <[email protected]> wrote:
> > This is a follow up patch for commit c70adc3cf6bf ("ndctl, filter:
> > refactor
> > util_<obj>_filter() to support multiple space-seperated arguments")
> > refactored util_<obj>_filter() to support multiple space-seperated
> > arguments.
> > But, when the keyword "all" is included in space-seperated arguments,
> > it will be treaded as <object>'s name. This patch fixes it.
> >
> > Signed-off-by: QI Fuli <[email protected]>
> > ---
> > util/filter.c | 12 ++++++++++++
> > 1 file changed, 12 insertions(+)
> >
> > diff --git a/util/filter.c b/util/filter.c index 0d3cc02..9081a6d
> > 100644
> > --- a/util/filter.c
> > +++ b/util/filter.c
> > @@ -40,6 +40,9 @@ struct ndctl_bus *util_bus_filter(struct ndctl_bus
> > *bus, const char *__ident)
> >
> > for (name = strtok_r(ident, " ", &save); name;
> > name = strtok_r(NULL, " ", &save)) {
> > + if (strcmp(ident, "all") == 0)
> > + break;
> > +
>
> Let's also remove the strcmp(__ident, "all") at the top of each of these
> routines to
> keep the check for "all" centralized.
>
OK, Thank you!
_______________________________________________
Linux-nvdimm mailing list
[email protected]
https://lists.01.org/mailman/listinfo/linux-nvdimm