]> git.kernelconcepts.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>
Sat, 3 Nov 2012 00:42:48 +0000 (11:42 +1100)
committerStephen Rothwell <sfr@canb.auug.org.au>
Tue, 6 Nov 2012 04:58:38 +0000 (15:58 +1100)
commit5101ae254846516372cc58be6f4ce47d8f584a0a
tree79970cade17a529db6823ada6f17112be9751e69
parent6c7561719f269471e35f94a11b4c70f794d7d059
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