lkml.org 
[lkml]   [2013]   [Nov]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    SubjectRe: [PATCH v2] dynamic_debug: add wildcard support to filter files/functions/modules
    From
    Date
    On Thu, 2013-11-07 at 11:11 +0800, Changbin Du wrote:
    > 2013/11/1 Joe Perches <joe@perches.com>:
    > > On Thu, 2013-10-31 at 15:52 -0700, Andrew Morton wrote:
    > >> On Mon, 28 Oct 2013 23:29:10 +0800 "Du, Changbin" <changbin.du@gmail.com> wrote:
    > > []
    > >> > +/* check if the string matches given pattern which includes wildcards */
    > >> > +static int match_pattern(const char *pattern, const char *string)
    > > []
    > >> No, something like this should be in lib/ so that other callers can use
    > >> it. We already have at least one copy handy in
    > >> drivers/ata/libata-core.c:glob_match(). A better approach would be to
    > >> move that glob_match() into lib/glob_match.c then teach dynamic_debug
    > >> to use it.
    > >>
    > >> There are probably other private globbing functions lying around the
    > >> kernel, but it's rather a hard thing to grep for...
    > >
    > > Maybe use lib/parser.c where the other match_<foo> functions
    > > are already.
    >
    > match_<foo> functions in lib/parser.c just do simple match, they
    > doesn't support wildcards.
    > So it's not useful for us.

    It's not meant to be useful so much as be a possible
    generic location for your match_regex function.




    \
     
     \ /
      Last update: 2013-11-07 07:41    [W:3.923 / U:0.004 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site