diff options
| author | Ingo Molnar <mingo@elte.hu> | 2009-04-07 13:34:26 +0200 |
|---|---|---|
| committer | Ingo Molnar <mingo@elte.hu> | 2009-04-07 13:34:42 +0200 |
| commit | 2e8844e13ab73f1107aea4317a53ff5879f2e1d7 (patch) | |
| tree | 36165371cf6fd26d674610f1c6bb5fac50e6e13f /include/linux/string.h | |
| parent | c78a3956b982418186e40978a51636a2b43221bc (diff) | |
| parent | d508afb437daee7cf07da085b635c44a4ebf9b38 (diff) | |
Merge branch 'linus' into tracing/hw-branch-tracing
Merge reason: update to latest tracing and ptrace APIs
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'include/linux/string.h')
| -rw-r--r-- | include/linux/string.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/include/linux/string.h b/include/linux/string.h index 27ac31784ad2..489019ef1694 100644 --- a/include/linux/string.h +++ b/include/linux/string.h @@ -13,6 +13,7 @@ #include <stdarg.h> extern char *strndup_user(const char __user *, long); +extern void *memdup_user(const void __user *, size_t); /* * Include machine specific inline routines @@ -121,5 +122,14 @@ int bprintf(u32 *bin_buf, size_t size, const char *fmt, ...) __printf(3, 4); extern ssize_t memory_read_from_buffer(void *to, size_t count, loff_t *ppos, const void *from, size_t available); +/** + * strstarts - does @str start with @prefix? + * @str: string to examine + * @prefix: prefix to look for. + */ +static inline bool strstarts(const char *str, const char *prefix) +{ + return strncmp(str, prefix, strlen(prefix)) == 0; +} #endif #endif /* _LINUX_STRING_H_ */ |
