diff options
author | anholt <anholt@FreeBSD.org> | 2003-04-24 23:36:35 +0000 |
---|---|---|
committer | anholt <anholt@FreeBSD.org> | 2003-04-24 23:36:35 +0000 |
commit | 066321f1e0898697c0a1b16ad811324e562c276e (patch) | |
tree | 26a9afb7dc02df11219c4c47974731c3a79ae42a /sys/compat | |
parent | 968ad4dbc697e71b999ed9a77bea991f282fa8ec (diff) | |
download | FreeBSD-src-066321f1e0898697c0a1b16ad811324e562c276e.zip FreeBSD-src-066321f1e0898697c0a1b16ad811324e562c276e.tar.gz |
Add an ioctl handler for the DRM. This removes the need for the DRM_LINUX
option, which has been a source of frustration for many users.
Diffstat (limited to 'sys/compat')
-rw-r--r-- | sys/compat/linux/linux_ioctl.c | 14 | ||||
-rw-r--r-- | sys/compat/linux/linux_ioctl.h | 3 |
2 files changed, 17 insertions, 0 deletions
diff --git a/sys/compat/linux/linux_ioctl.c b/sys/compat/linux/linux_ioctl.c index cda16ba..9b69fdc 100644 --- a/sys/compat/linux/linux_ioctl.c +++ b/sys/compat/linux/linux_ioctl.c @@ -69,6 +69,7 @@ static linux_ioctl_function_t linux_ioctl_socket; static linux_ioctl_function_t linux_ioctl_sound; static linux_ioctl_function_t linux_ioctl_termio; static linux_ioctl_function_t linux_ioctl_private; +static linux_ioctl_function_t linux_ioctl_drm; static linux_ioctl_function_t linux_ioctl_special; static struct linux_ioctl_handler cdrom_handler = @@ -87,6 +88,8 @@ static struct linux_ioctl_handler termio_handler = { linux_ioctl_termio, LINUX_IOCTL_TERMIO_MIN, LINUX_IOCTL_TERMIO_MAX }; static struct linux_ioctl_handler private_handler = { linux_ioctl_private, LINUX_IOCTL_PRIVATE_MIN, LINUX_IOCTL_PRIVATE_MAX }; +static struct linux_ioctl_handler drm_handler = +{ linux_ioctl_drm, LINUX_IOCTL_DRM_MIN, LINUX_IOCTL_DRM_MAX }; DATA_SET(linux_ioctl_handler_set, cdrom_handler); DATA_SET(linux_ioctl_handler_set, vfat_handler); @@ -96,6 +99,7 @@ DATA_SET(linux_ioctl_handler_set, socket_handler); DATA_SET(linux_ioctl_handler_set, sound_handler); DATA_SET(linux_ioctl_handler_set, termio_handler); DATA_SET(linux_ioctl_handler_set, private_handler); +DATA_SET(linux_ioctl_handler_set, drm_handler); struct handler_element { @@ -2331,6 +2335,16 @@ linux_ioctl_private(struct thread *td, struct linux_ioctl_args *args) } /* + * DRM ioctl handler (sys/dev/drm) + */ +static int +linux_ioctl_drm(struct thread *td, struct linux_ioctl_args *args) +{ + args->cmd = SETDIR(args->cmd); + return ioctl(td, (struct ioctl_args *)args); +} + +/* * Special ioctl handler */ static int diff --git a/sys/compat/linux/linux_ioctl.h b/sys/compat/linux/linux_ioctl.h index ccee935..3189a49 100644 --- a/sys/compat/linux/linux_ioctl.h +++ b/sys/compat/linux/linux_ioctl.h @@ -667,6 +667,9 @@ #define LINUX_ASYNC_CALLOUT_NOHUP 0x0400 #define LINUX_ASYNC_FLAGS 0x0FFF +#define LINUX_IOCTL_DRM_MIN 0x6400 +#define LINUX_IOCTL_DRM_MAX 0x64ff + /* * This doesn't really belong here, but I can't think of a better * place to put it. |