[svn-commits] fjoe: freebsd/trunk r10687 - in /freebsd/trunk: drivers/dahdi/ include/dahdi/

SVN commits to the Digium repositories svn-commits at lists.digium.com
Wed May 30 08:09:22 CDT 2012


Author: fjoe
Date: Wed May 30 08:09:15 2012
New Revision: 10687

URL: http://svnview.digium.com/svn/dahdi?view=rev&rev=10687
Log:
Redefine __copy_to/from_user globally: they are used only in ioctl
(ioctl arguments are copied to kernel space and back by kernel in FreeBSD).

Modified:
    freebsd/trunk/drivers/dahdi/dahdi-base.c
    freebsd/trunk/include/dahdi/kernel.h

Modified: freebsd/trunk/drivers/dahdi/dahdi-base.c
URL: http://svnview.digium.com/svn/dahdi/freebsd/trunk/drivers/dahdi/dahdi-base.c?view=diff&rev=10687&r1=10686&r2=10687
==============================================================================
--- freebsd/trunk/drivers/dahdi/dahdi-base.c (original)
+++ freebsd/trunk/drivers/dahdi/dahdi-base.c Wed May 30 08:09:15 2012
@@ -108,14 +108,6 @@
 #include <sys/proc.h>
 
 #include "ng_dahdi_iface.h"
-
-/*
- * ioctl argument is in kernel space in FreeBSD
- */
-#undef __copy_from_user
-#undef __copy_to_user
-#define __copy_from_user(to, from, n)	(bcopy((from), (to), (n)), 0)
-#define __copy_to_user(to, from, n)	(bcopy((from), (to), (n)), 0)
 
 #define signal_pending(current)	(0)
 

Modified: freebsd/trunk/include/dahdi/kernel.h
URL: http://svnview.digium.com/svn/dahdi/freebsd/trunk/include/dahdi/kernel.h?view=diff&rev=10687&r1=10686&r2=10687
==============================================================================
--- freebsd/trunk/include/dahdi/kernel.h (original)
+++ freebsd/trunk/include/dahdi/kernel.h Wed May 30 08:09:15 2012
@@ -66,6 +66,17 @@
 #define local_irq_restore(f)
 
 #define DAHDI_IRQ_HANDLER(a) static int a(void *dev_id)
+
+/*
+ * ioctl argument is in kernel space in FreeBSD
+ */
+#ifndef __copy_from_user
+#error "__copy_from_user is not defined"
+#endif
+#undef __copy_from_user
+#undef __copy_to_user
+#define __copy_from_user(to, from, n)	(bcopy((from), (to), (n)), 0)
+#define __copy_to_user(to, from, n)	(bcopy((from), (to), (n)), 0)
 #elif LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,19)
 #define DAHDI_IRQ_HANDLER(a) static irqreturn_t a(int irq, void *dev_id)
 #else




More information about the svn-commits mailing list