]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - drivers/ide/ide-floppy_ioctl.c
[PATCH] introduce fmode_t, do annotations
[linux-2.6-omap-h63xx.git] / drivers / ide / ide-floppy_ioctl.c
index 409e4c15f9b71b6c2d67d2aa302bd4fe524ccf3d..0d5f5054ab64720ba299b19eb540ebc6caa0e6de 100644 (file)
@@ -250,7 +250,7 @@ static int ide_floppy_format_ioctl(ide_drive_t *drive, struct file *file,
        case IDEFLOPPY_IOCTL_FORMAT_GET_CAPACITY:
                return ide_floppy_get_format_capacities(drive, argp);
        case IDEFLOPPY_IOCTL_FORMAT_START:
-               if (!(file->f_mode & 2))
+               if (!(file->f_mode & FMODE_WRITE))
                        return -EPERM;
                return ide_floppy_format_unit(drive, (int __user *)argp);
        case IDEFLOPPY_IOCTL_FORMAT_GET_PROGRESS: