From 591d270f4cb78aa28bf4425bd40ffa64369adf01 Mon Sep 17 00:00:00 2001 From: sobomax Date: Fri, 11 Oct 2002 11:43:09 +0000 Subject: - Add support for IPC_64 extensions into shmctl(2), semctl(2) and msgctl(2); - add wrappers for mmap2(2) and ftruncate64(2) system calls; - don't spam console with printf's when VFAT_READDIR_BOTH ioctl(2) is invoked; - add support for SOUND_MIXER_READ_STEREODEVS ioctl(2); - make msgctl(IPC_STAT) and IPC_SET actually working by converting from BSD msqid_ds to Linux and vice versa; - properly return EINVAL if semget(2) is called with nsems being negative. Reviewed by: marcel Approved by: marcel Tested with: LSB runtime test --- sys/compat/linux/linux_ioctl.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'sys/compat/linux/linux_ioctl.c') diff --git a/sys/compat/linux/linux_ioctl.c b/sys/compat/linux/linux_ioctl.c index 8ddd139..37cc872 100644 --- a/sys/compat/linux/linux_ioctl.c +++ b/sys/compat/linux/linux_ioctl.c @@ -61,6 +61,7 @@ #include static linux_ioctl_function_t linux_ioctl_cdrom; +static linux_ioctl_function_t linux_ioctl_vfat; static linux_ioctl_function_t linux_ioctl_console; static linux_ioctl_function_t linux_ioctl_disk; static linux_ioctl_function_t linux_ioctl_socket; @@ -71,6 +72,8 @@ static linux_ioctl_function_t linux_ioctl_special; static struct linux_ioctl_handler cdrom_handler = { linux_ioctl_cdrom, LINUX_IOCTL_CDROM_MIN, LINUX_IOCTL_CDROM_MAX }; +static struct linux_ioctl_handler vfat_handler = +{ linux_ioctl_vfat, LINUX_IOCTL_VFAT_MIN, LINUX_IOCTL_VFAT_MAX }; static struct linux_ioctl_handler console_handler = { linux_ioctl_console, LINUX_IOCTL_CONSOLE_MIN, LINUX_IOCTL_CONSOLE_MAX }; static struct linux_ioctl_handler disk_handler = @@ -85,6 +88,7 @@ static struct linux_ioctl_handler private_handler = { linux_ioctl_private, LINUX_IOCTL_PRIVATE_MIN, LINUX_IOCTL_PRIVATE_MAX }; DATA_SET(linux_ioctl_handler_set, cdrom_handler); +DATA_SET(linux_ioctl_handler_set, vfat_handler); DATA_SET(linux_ioctl_handler_set, console_handler); DATA_SET(linux_ioctl_handler_set, disk_handler); DATA_SET(linux_ioctl_handler_set, socket_handler); @@ -1473,6 +1477,13 @@ linux_ioctl_cdrom(struct thread *td, struct linux_ioctl_args *args) return (error); } +static int +linux_ioctl_vfat(struct thread *td, struct linux_ioctl_args *args) +{ + + return (ENOTTY); +} + /* * Sound related ioctls */ @@ -1560,6 +1571,10 @@ linux_ioctl_sound(struct thread *td, struct linux_ioctl_args *args) return (copyout(&version, (caddr_t)args->arg, sizeof(int))); } + case LINUX_SOUND_MIXER_READ_STEREODEVS: + args->cmd = SOUND_MIXER_READ_STEREODEVS; + return (ioctl(td, (struct ioctl_args *)args)); + case LINUX_SOUND_MIXER_READ_DEVMASK: args->cmd = SOUND_MIXER_READ_DEVMASK; return (ioctl(td, (struct ioctl_args *)args)); -- cgit v1.1