patch-2.3.35 linux/include/asm-sparc/uaccess.h
Next file: linux/include/asm-sparc/unistd.h
Previous file: linux/include/asm-sparc/termios.h
Back to the patch index
Back to the overall index
- Lines: 29
- Date:
Mon Dec 20 22:05:52 1999
- Orig file:
v2.3.34/linux/include/asm-sparc/uaccess.h
- Orig date:
Tue Aug 31 17:29:14 1999
diff -u --recursive --new-file v2.3.34/linux/include/asm-sparc/uaccess.h linux/include/asm-sparc/uaccess.h
@@ -1,4 +1,4 @@
-/* $Id: uaccess.h,v 1.19 1999/08/14 03:52:11 anton Exp $
+/* $Id: uaccess.h,v 1.20 1999/11/23 08:56:45 davem Exp $
* uaccess.h: User space memore access functions.
*
* Copyright (C) 1996 David S. Miller (davem@caip.rutgers.edu)
@@ -384,6 +384,7 @@
} __sfu_res; })
extern int __strlen_user(const char *);
+extern int __strnlen_user(const char *, long len);
extern __inline__ int strlen_user(const char *str)
{
@@ -391,6 +392,14 @@
return 0;
else
return __strlen_user(str);
+}
+
+extern __inline__ int strnlen_user(const char *str, long len)
+{
+ if(!access_ok(VERIFY_READ, str, 0))
+ return 0;
+ else
+ return __strnlen_user(str, len);
}
#endif /* __ASSEMBLY__ */
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)