Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 346401
b: refs/heads/master
c: b18888a
h: refs/heads/master
i:
  346399: 431020f
v: v3
  • Loading branch information
Andy Shevchenko authored and Linus Torvalds committed Dec 18, 2012
1 parent 3f462bf commit 29e68b6
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 0edd807dc96522d9a8e8b5298552cd8adf810cc5
refs/heads/master: b18888ab256f05626193be955a7a03f01d676f8c
11 changes: 11 additions & 0 deletions trunk/include/linux/string.h
Original file line number Diff line number Diff line change
Expand Up @@ -143,4 +143,15 @@ static inline bool strstarts(const char *str, const char *prefix)

extern size_t memweight(const void *ptr, size_t bytes);

/**
* kbasename - return the last part of a pathname.
*
* @path: path to extract the filename from.
*/
static inline const char *kbasename(const char *path)
{
const char *tail = strrchr(path, '/');
return tail ? tail + 1 : path;
}

#endif /* _LINUX_STRING_H_ */

0 comments on commit 29e68b6

Please sign in to comment.