source: GPL/trunk/include/linux/string.h@ 777

Last change on this file since 777 was 777, checked in by David Azarewicz, 4 months ago

Merge from uniaud32-exp branch

File size: 1004 bytes
Line 
1#ifndef _LINUX_STRING_H
2#define _LINUX_STRING_H
3
4#include <linux/slab.h>
5
6#if 0
7char *strstr1 (const char *string1, const char *string2);
8
9char *strncpy (char *string1, const char *string2, size_t count);
10
11int strcmp (const char *string1, const char *string2);
12
13int strncmp (const char *string1, const char *string2, size_t count);
14#endif
15
16extern void *memset32(uint32_t *, uint32_t, __kernel_size_t);
17char *kstrdup(const char *s, unsigned int gfp_flags);
18_WCRTLINK extern size_t strnlen_s( const char *__s, size_t __maxsize );
19#define strnlen strnlen_s
20extern void *memdup_user(const void __user *, size_t);
21
22static inline void *kmemdup(const void *src, size_t len, gfp_t gfp)
23{
24 void *dst = kmalloc(len, gfp);
25 if (!dst)
26 return NULL;
27 memcpy(dst, src, len);
28 return dst;
29}
30
31#define vmemdup_user memdup_user
32#define scnprintf snprintf
33ssize_t strscpy(char *dest, const char *src, size_t count);
34extern bool sysfs_streq(const char *s1, const char *s2);
35#endif
36
Note: See TracBrowser for help on using the repository browser.