]> git.baikalelectronics.ru Git - kernel.git/commit
lib/parser.c: add match_wildcard() function
authorDu, Changbin <changbin.du@gmail.com>
Thu, 23 Jan 2014 23:54:12 +0000 (15:54 -0800)
committerLinus Torvalds <torvalds@linux-foundation.org>
Fri, 24 Jan 2014 00:36:55 +0000 (16:36 -0800)
commit8048918a272c2f0b581f8743eb0f7b80e34c357a
treeca2e61621bcb24ad83f3f145987c8ffd5c28c65b
parent9d6574f1ac79e650fd3b97f035b6c0777590c9a8
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>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
include/linux/parser.h
lib/parser.c