]> err.no Git - linux-2.6/blobdiff - drivers/scsi/st.c
Merge branch 'upstream' of git://git.kernel.org/pub/scm/linux/kernel/git/linville...
[linux-2.6] / drivers / scsi / st.c
index febfac97ad3853cbc20761762733b963d7077ab5..587274dd70596a18d7eda3f9326bd8220a9ec017 100644 (file)
@@ -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;