]> git.karo-electronics.de Git - karo-tx-linux.git/commit
string: introduce helper to get base file name from given path
authorAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Thu, 25 Oct 2012 01:15:04 +0000 (12:15 +1100)
committerStephen Rothwell <sfr@canb.auug.org.au>
Mon, 29 Oct 2012 03:17:29 +0000 (14:17 +1100)
commit9c1acce8a16038b2a77abd682d06082f07cdbb6a
treeacd7e328fa0496ba52029fa0d27964163f83374a
parent76057eed557e794c8a4f84b96bc612ae16b4f629
string: introduce helper to get base file name from given path

There are several places in the kernel that use functionality like
basename(3) with the exception: in case of '/foo/bar/' we expect to get an
empty string.  Let's do it common helper for them.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Cc: Jason Baron <jbaron@redhat.com>
Cc: YAMANE Toshiaki <yamanetoshi@gmail.com>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Steven Rostedt <rostedt@goodmis.org>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
include/linux/string.h