]> 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, 29 Nov 2012 03:18:32 +0000 (14:18 +1100)
committerStephen Rothwell <sfr@canb.auug.org.au>
Wed, 5 Dec 2012 05:23:33 +0000 (16:23 +1100)
commit28b551df3cc2aab6c344ead508980a76bd7fc512
treeebd6ec22cd5ed55b2c087c8af3c1f37c64b82bbe
parent50f0bdd4a2624e53c42476354dbd1db8fdec6b0e
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