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

Last change on this file since 717 was 717, checked in by David Azarewicz, 3 years ago

Merge changes from next branch.

File size: 931 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
16char *kstrdup(const char *s, unsigned int gfp_flags);
17_WCRTLINK extern size_t strnlen_s( const char *__s, size_t __maxsize );
18#define strnlen strnlen_s
19extern void *memdup_user(const void __user *, size_t);
20
21static inline void *kmemdup(const void *src, size_t len, gfp_t gfp)
22{
23 void *dst = kmalloc(len, gfp);
24 if (!dst)
25 return NULL;
26 memcpy(dst, src, len);
27 return dst;
28}
29ssize_t strscpy(char *, const char *, size_t);
30#define vmemdup_user memdup_user
31#define scnprintf snprintf
32ssize_t strscpy(char *dest, const char *src, size_t count);
33
34#endif
35
Note: See TracBrowser for help on using the repository browser.