]> git.hungrycats.org Git - linux/commitdiff
[PATCH] IDE cleanup (1.612) broke all fdisks I have...
authorPetr Vandrovec <vandrove@vc.cvut.cz>
Thu, 5 Sep 2002 11:17:19 +0000 (04:17 -0700)
committerPetr Vandrovec <vandrove@vc.cvut.cz>
Thu, 5 Sep 2002 11:17:19 +0000 (04:17 -0700)
It is nice that blkdev_ioctl calls blk_ioctl itself, but unfortunately
it does that only if driver's ioctl returns -EINVAL - and IDE returns
-EIO :-(

Patch below is tested for disks - I do not have IDE floppy nor IDE tape.

drivers/ide/ide-floppy.c
drivers/ide/ide.c

index 24ef0f8ba41275cdc5fb77c159be795702a202b5..4a62a49af582e8e4a90fe24274f9c56964f4d99f 100644 (file)
@@ -1817,7 +1817,7 @@ static int idefloppy_ioctl (ide_drive_t *drive, struct inode *inode, struct file
                return (idefloppy_get_format_progress(drive, inode, file,
                                                      (int *)arg));
        }
-       return -EIO;
+       return -EINVAL;
 }
 
 /*
index 8d35d74687a38d2f8ba6c89b6ce3d4cbf14060be..8ae42efbe71c6d6495c2e49a60b135c8dea4d853 100644 (file)
@@ -3347,7 +3347,7 @@ static ide_startstop_t default_error (ide_drive_t *drive, const char *msg, byte
 static int default_ioctl (ide_drive_t *drive, struct inode *inode, struct file *file,
                          unsigned int cmd, unsigned long arg)
 {
-       return -EIO;
+       return -EINVAL;
 }
 
 static int default_open (struct inode *inode, struct file *filp, ide_drive_t *drive)