Ignore:
Timestamp:
Jan 1, 2021, 5:31:48 AM (5 years ago)
Author:
Paul Smedley
Message:

Add source for uniaud32 based on code from linux kernel 5.4.86

Location:
GPL/branches/uniaud32-next
Files:
1 edited
1 copied

Legend:

Unmodified
Added
Removed
  • GPL/branches/uniaud32-next/include/linux/string.h

    r614 r615  
    11#ifndef _LINUX_STRING_H
    22#define _LINUX_STRING_H
     3
     4#include <linux/slab.h>
     5
    36#if 0
    47char *strstr1 (const char *string1, const char *string2);
     
    1215
    1316char *kstrdup(const char *s, unsigned int gfp_flags);
    14 void *memdup_user(const void __user *src, size_t len);
     17_WCRTLINK extern size_t  strnlen_s( const char *__s, size_t __maxsize );
    1518#define strnlen strnlen_s
    16 _WCRTLINK extern size_t  strnlen_s( const char *__s, size_t __maxsize );
     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
    1732#endif
    1833
Note: See TracChangeset for help on using the changeset viewer.