Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F154620666
D53158.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
D53158.diff
View Options
diff --git a/sys/compat/linux/linux_ioctl.h b/sys/compat/linux/linux_ioctl.h
--- a/sys/compat/linux/linux_ioctl.h
+++ b/sys/compat/linux/linux_ioctl.h
@@ -823,4 +823,16 @@
int linux32_ioctl_unregister_handler(struct linux_ioctl_handler *h);
#endif
+#define LINUX_IOCTL_SET(n, low, high) \
+static linux_ioctl_function_t n##_linux_ioctl; \
+static struct linux_ioctl_handler n##_linux_handler = { \
+ n##_linux_ioctl, \
+ low, \
+ high \
+}; \
+SYSINIT(n##_ioctl_register, SI_SUB_KLD, SI_ORDER_MIDDLE, \
+ linux_ioctl_register_handler, &n##_linux_handler); \
+SYSUNINIT(n##_ioctl_unregister, SI_SUB_KLD, SI_ORDER_MIDDLE, \
+ linux_ioctl_unregister_handler, &n##_linux_handler)
+
#endif /* !_LINUX_IOCTL_H_ */
diff --git a/sys/dev/tdfx/tdfx_linux.h b/sys/dev/tdfx/tdfx_linux.h
--- a/sys/dev/tdfx/tdfx_linux.h
+++ b/sys/dev/tdfx/tdfx_linux.h
@@ -35,18 +35,6 @@
#include <machine/../linux/linux_proto.h>
#include <compat/linux/linux_ioctl.h>
-/*
- * This code was donated by Vladimir N. Silynaev to allow for defining
- * ioctls within modules
- */
-#define LINUX_IOCTL_SET(n,low,high) \
-static linux_ioctl_function_t linux_ioctl_##n; \
-static struct linux_ioctl_handler n##_handler = {linux_ioctl_##n, low, high}; \
-SYSINIT(n##register, SI_SUB_KLD, SI_ORDER_MIDDLE,\
-linux_ioctl_register_handler, &n##_handler); \
-SYSUNINIT(n##unregister, SI_SUB_KLD, SI_ORDER_MIDDLE,\
-linux_ioctl_unregister_handler, &n##_handler);
-
/* Values for /dev/3dfx */
/* Query IOCTLs */
#define LINUX_IOCTL_TDFX_QUERY_BOARDS 0x3302
diff --git a/sys/dev/tdfx/tdfx_linux.c b/sys/dev/tdfx/tdfx_linux.c
--- a/sys/dev/tdfx/tdfx_linux.c
+++ b/sys/dev/tdfx/tdfx_linux.c
@@ -42,7 +42,7 @@
* Linux emulation IOCTL for /dev/tdfx
*/
static int
-linux_ioctl_tdfx(struct thread *td, struct linux_ioctl_args* args)
+tdfx_linux_ioctl(struct thread *td, struct linux_ioctl_args* args)
{
cap_rights_t rights;
int error = 0;
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Thu, Apr 30, 1:38 AM (7 h, 51 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
32361601
Default Alt Text
D53158.diff (1 KB)
Attached To
Mode
D53158: linux: Make the macro LINUX_IOCTL_SET public
Attached
Detach File
Event Timeline
Log In to Comment