Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 61905
b: refs/heads/master
c: 89636af
h: refs/heads/master
i:
  61903: 482f543
v: v3
  • Loading branch information
Bartlomiej Zolnierkiewicz committed Jul 19, 2007
1 parent cfdccb7 commit b248f79
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 6 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 4bf9fdf7f21f118e2c5052ec8e46faf00eb5a4ea
refs/heads/master: 89636af25d75d8672aea05d258be357d0dc4bd70
18 changes: 17 additions & 1 deletion trunk/drivers/ide/ide-floppy.c
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,8 @@
#include <linux/bitops.h>
#include <linux/mutex.h>

#include <scsi/scsi_ioctl.h>

#include <asm/byteorder.h>
#include <asm/irq.h>
#include <asm/uaccess.h>
Expand Down Expand Up @@ -2099,7 +2101,21 @@ static int idefloppy_ioctl(struct inode *inode, struct file *file,
case IDEFLOPPY_IOCTL_FORMAT_GET_PROGRESS:
return idefloppy_get_format_progress(drive, argp);
}
return generic_ide_ioctl(drive, file, bdev, cmd, arg);

/*
* skip SCSI_IOCTL_SEND_COMMAND (deprecated)
* and CDROM_SEND_PACKET (legacy) ioctls
*/
if (cmd != CDROM_SEND_PACKET && cmd != SCSI_IOCTL_SEND_COMMAND)
err = scsi_cmd_ioctl(file, bdev->bd_disk->queue,
bdev->bd_disk, cmd, argp);
else
err = -ENOTTY;

if (err == -ENOTTY)
err = generic_ide_ioctl(drive, file, bdev, cmd, arg);

return err;
}

static int idefloppy_media_changed(struct gendisk *disk)
Expand Down
4 changes: 0 additions & 4 deletions trunk/drivers/ide/ide.c
Original file line number Diff line number Diff line change
Expand Up @@ -1097,10 +1097,6 @@ int generic_ide_ioctl(ide_drive_t *drive, struct file *file, struct block_device
return 0;
}

case CDROMEJECT:
case CDROMCLOSETRAY:
return scsi_cmd_ioctl(file, bdev->bd_disk->queue, bdev->bd_disk, cmd, p);

case HDIO_GET_BUSSTATE:
if (!capable(CAP_SYS_ADMIN))
return -EACCES;
Expand Down

0 comments on commit b248f79

Please sign in to comment.