Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/riastradh-drm2]: src/sys/external/bsd/drm2/include Define copy_{to, from}...
details: https://anonhg.NetBSD.org/src/rev/2313dba40534
branches: riastradh-drm2
changeset: 788056:2313dba40534
user: riastradh <riastradh%NetBSD.org@localhost>
date: Wed Jul 24 02:02:03 2013 +0000
description:
Define copy_{to,from}_user in <linux/uaccess.h> & <asm/uaccess.h>.
diffstat:
sys/external/bsd/drm2/include/asm/uaccess.h | 18 +++++++++++++++++-
sys/external/bsd/drm2/include/linux/uaccess.h | 4 +++-
2 files changed, 20 insertions(+), 2 deletions(-)
diffs (46 lines):
diff -r 284e4c63c682 -r 2313dba40534 sys/external/bsd/drm2/include/asm/uaccess.h
--- a/sys/external/bsd/drm2/include/asm/uaccess.h Wed Jul 24 02:01:42 2013 +0000
+++ b/sys/external/bsd/drm2/include/asm/uaccess.h Wed Jul 24 02:02:03 2013 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: uaccess.h,v 1.1.2.1 2013/07/24 00:33:11 riastradh Exp $ */
+/* $NetBSD: uaccess.h,v 1.1.2.2 2013/07/24 02:02:03 riastradh Exp $ */
/*-
* Copyright (c) 2013 The NetBSD Foundation, Inc.
@@ -32,4 +32,20 @@
#ifndef _ASM_UACCESS_H_
#define _ASM_UACCESS_H_
+#include <sys/types.h>
+#include <sys/systm.h>
+
+static inline int
+copy_from_user(void *kernel_addr, const void *user_addr, size_t len)
+{
+ return -copyin(user_addr, kernel_addr, len);
+}
+
+static inline int
+copy_to_user(void *user_addr, const void *kernel_addr, size_t len)
+{
+ return -copyout(kernel_addr, user_addr, len);
+}
+
+
#endif /* _ASM_UACCESS_H_ */
diff -r 284e4c63c682 -r 2313dba40534 sys/external/bsd/drm2/include/linux/uaccess.h
--- a/sys/external/bsd/drm2/include/linux/uaccess.h Wed Jul 24 02:01:42 2013 +0000
+++ b/sys/external/bsd/drm2/include/linux/uaccess.h Wed Jul 24 02:02:03 2013 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: uaccess.h,v 1.1.2.1 2013/07/24 00:33:12 riastradh Exp $ */
+/* $NetBSD: uaccess.h,v 1.1.2.2 2013/07/24 02:02:03 riastradh Exp $ */
/*-
* Copyright (c) 2013 The NetBSD Foundation, Inc.
@@ -32,4 +32,6 @@
#ifndef _LINUX_UACCESS_H_
#define _LINUX_UACCESS_H_
+#include <asm/uaccess.h>
+
#endif /* _LINUX_UACCESS_H_ */
Home |
Main Index |
Thread Index |
Old Index