patch-2.1.75 linux/drivers/block/floppy.c

Next file: linux/drivers/block/ide-disk.c
Previous file: linux/arch/i386/mm/init.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.1.74/linux/drivers/block/floppy.c linux/drivers/block/floppy.c
@@ -3295,8 +3295,8 @@
 		return -EINVAL;
 
 	/* permission checks */
-	if (((cmd & 0x80) && !suser()) ||
-	     ((cmd & 0x40) && !IOCTL_ALLOWED))
+	if (((cmd & 0x40) && !IOCTL_ALLOWED) ||
+	    ((cmd & 0x80) && !suser()))
 		return -EPERM;
 
 	/* copyin */

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov