From 5cdfd8f70939503bbc28417bfd7df67c163afd0f Mon Sep 17 00:00:00 2001 From: John Hay Date: Wed, 6 Oct 1999 19:51:37 +0000 Subject: [PATCH] Swap IOC_OUT and IOC_IN for the SETDIR macro. The linux ioctl read and write bits are swapped. Reviewed by: luoqi, marcel --- sys/compat/linux/linux_ioctl.c | 2 +- sys/i386/linux/linux_ioctl.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/compat/linux/linux_ioctl.c b/sys/compat/linux/linux_ioctl.c index d071bcd7704..0729be1fb65 100644 --- a/sys/compat/linux/linux_ioctl.c +++ b/sys/compat/linux/linux_ioctl.c @@ -527,7 +527,7 @@ set_linux_cdrom_addr(union linux_cdrom_addr *addr, int format, int lba) addr->lba = lba; } -static unsigned dirbits[4] = { IOC_VOID, IOC_OUT, IOC_IN, IOC_INOUT }; +static unsigned dirbits[4] = { IOC_VOID, IOC_IN, IOC_OUT, IOC_INOUT }; #define SETDIR(c) (((c) & ~IOC_DIRMASK) | dirbits[args->cmd >> 30]) diff --git a/sys/i386/linux/linux_ioctl.c b/sys/i386/linux/linux_ioctl.c index d071bcd7704..0729be1fb65 100644 --- a/sys/i386/linux/linux_ioctl.c +++ b/sys/i386/linux/linux_ioctl.c @@ -527,7 +527,7 @@ set_linux_cdrom_addr(union linux_cdrom_addr *addr, int format, int lba) addr->lba = lba; } -static unsigned dirbits[4] = { IOC_VOID, IOC_OUT, IOC_IN, IOC_INOUT }; +static unsigned dirbits[4] = { IOC_VOID, IOC_IN, IOC_OUT, IOC_INOUT }; #define SETDIR(c) (((c) & ~IOC_DIRMASK) | dirbits[args->cmd >> 30])