]> git.karo-electronics.de Git - karo-tx-linux.git/commit
lib/parser.c: add match_wildcard function
authorDu, Changbin <changbin.du@gmail.com>
Fri, 3 Jan 2014 03:10:10 +0000 (14:10 +1100)
committerStephen Rothwell <sfr@canb.auug.org.au>
Fri, 3 Jan 2014 03:10:10 +0000 (14:10 +1100)
commita8df020d0eb99f31e0e6a14746b29df0813f69a1
treec6b5bc5f5d29c8ccd37c26840b86d0661242150c
parent2ec46f0aeafd8e147425d83882a31c8c308b4098
lib/parser.c: add match_wildcard function

match_wildcard function is a simple implementation of wildcard
matching algorithm. It only supports two usual wildcardes:
    '*' - matches zero or more characters
    '?' - matches one character
This algorithm is safe since it is non-recursive.

Signed-off-by: Du, Changbin <changbin.du@gmail.com>
Cc: Jason Baron <jbaron@akamai.com>
Cc: Joe Perches <joe@perches.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
include/linux/parser.h
lib/parser.c