diff options
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 @@ | |||
13 | #include <stdarg.h> | 13 | #include <stdarg.h> |
14 | 14 | ||
15 | extern char *strndup_user(const char __user *, long); | 15 | extern char *strndup_user(const char __user *, long); |
16 | extern void *memdup_user(const void __user *, size_t); | ||
16 | 17 | ||
17 | /* | 18 | /* |
18 | * Include machine specific inline routines | 19 | * Include machine specific inline routines |
@@ -121,5 +122,14 @@ int bprintf(u32 *bin_buf, size_t size, const char *fmt, ...) __printf(3, 4); | |||
121 | extern ssize_t memory_read_from_buffer(void *to, size_t count, loff_t *ppos, | 122 | extern ssize_t memory_read_from_buffer(void *to, size_t count, loff_t *ppos, |
122 | const void *from, size_t available); | 123 | const void *from, size_t available); |
123 | 124 | ||
125 | /** | ||
126 | * strstarts - does @str start with @prefix? | ||
127 | * @str: string to examine | ||
128 | * @prefix: prefix to look for. | ||
129 | */ | ||
130 | static inline bool strstarts(const char *str, const char *prefix) | ||
131 | { | ||
132 | return strncmp(str, prefix, strlen(prefix)) == 0; | ||
133 | } | ||
124 | #endif | 134 | #endif |
125 | #endif /* _LINUX_STRING_H_ */ | 135 | #endif /* _LINUX_STRING_H_ */ |