diff options
author | Kai Makisara <Kai.Makisara@kolumbus.fi> | 2006-10-05 21:59:46 +0200 |
---|---|---|
committer | James Bottomley <jejb@mulgrave.il.steeleye.com> | 2006-10-26 00:11:59 +0200 |
commit | 413f73272090a69e35a03c938272ec661b1d3d4c (patch) | |
tree | cbd35ad92c9f02436c2f498d273956337b8f08f9 /drivers | |
parent | [SCSI] Scsi_Cmnd conversion in qlogicfas408 driver (diff) | |
download | linux-413f73272090a69e35a03c938272ec661b1d3d4c.tar.xz linux-413f73272090a69e35a03c938272ec661b1d3d4c.zip |
[SCSI] st: Fixup -ENOMEDIUM
Based on the original patch from Hannes Reinecke <hare@suse.de>
Fix st_open() to return -ENOMEDIUM instead of -EIO if no medium is
found.
Signed-off-by: Kai Makisara <kai.makisara@kolumbus.fi>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/scsi/st.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/scsi/st.c b/drivers/scsi/st.c index 3babdc76b3fb..e1a52c525ed4 100644 --- a/drivers/scsi/st.c +++ b/drivers/scsi/st.c @@ -1177,7 +1177,10 @@ static int st_open(struct inode *inode, struct file *filp) goto err_out; if ((filp->f_flags & O_NONBLOCK) == 0 && retval != CHKRES_READY) { - retval = (-EIO); + if (STp->ready == NO_TAPE) + retval = (-ENOMEDIUM); + else + retval = (-EIO); goto err_out; } return 0; |