Commit b3701e0e authored by Douglas Gilbert's avatar Douglas Gilbert Committed by James Bottomley

[PATCH] st.c for GET_IDLUN

A little more testing of st's SG_IO ioctl turned up a
small problem.

This is the corresponding patch that was applied to the
sd driver when it received the block layer SG_IO ioctl.

For least surprise of lk 2.4 utilities that use the
SCSI_IOCTL_GET_IDLUN and SCSI_IOCTL_GET_BUS_NUMBER
ioctls (e.g. sg_map) it is better to return the correct
values rather than 0.
parent 9fc5617d
......@@ -3408,10 +3408,16 @@ static int st_ioctl(struct inode *inode, struct file *file,
goto out;
}
up(&STp->lock);
switch (cmd_in) {
case SCSI_IOCTL_GET_IDLUN:
case SCSI_IOCTL_GET_BUS_NUMBER:
break;
default:
i = scsi_cmd_ioctl(STp->disk, cmd_in, arg);
if (i != -ENOTTY)
return i;
else
break;
}
return scsi_ioctl(STp->device, cmd_in, (void *) arg);
out:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment