diff options
| author | Takashi Iwai <tiwai@suse.de> | 2009-05-04 18:00:16 +0400 |
|---|---|---|
| committer | Takashi Iwai <tiwai@suse.de> | 2009-05-04 18:00:16 +0400 |
| commit | 3a20ac2c52b1317f5a5f0bd9cd3cbe8495ddd026 (patch) | |
| tree | 9a912f2609cefb9698b5cce09cd240bd6dbd09fb /include/linux/string.h | |
| parent | 18cc8d8d9b74c446832336d8f6e1afb145f9431b (diff) | |
| parent | 3e5b50165fd0be080044586f43fcdd460ed27610 (diff) | |
| download | linux-3a20ac2c52b1317f5a5f0bd9cd3cbe8495ddd026.tar.xz | |
Merge branch 'fix/pcm-jiffies-check' into fix/asoc
Diffstat (limited to 'include/linux/string.h')
| -rw-r--r-- | include/linux/string.h | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/include/linux/string.h b/include/linux/string.h index d18fc198aa2f..489019ef1694 100644 --- a/include/linux/string.h +++ b/include/linux/string.h @@ -10,8 +10,10 @@ #include <linux/compiler.h> /* for inline */ #include <linux/types.h> /* for size_t */ #include <linux/stddef.h> /* for NULL */ +#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 @@ -111,8 +113,23 @@ extern void argv_free(char **argv); extern bool sysfs_streq(const char *s1, const char *s2); +#ifdef CONFIG_BINARY_PRINTF +int vbin_printf(u32 *bin_buf, size_t size, const char *fmt, va_list args); +int bstr_printf(char *buf, size_t size, const char *fmt, const u32 *bin_buf); +int bprintf(u32 *bin_buf, size_t size, const char *fmt, ...) __printf(3, 4); +#endif + 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_ */ |
