Commit 413f7327 authored by Kai Makisara's avatar Kai Makisara Committed by James Bottomley
Browse files


Based on the original patch from Hannes Reinecke <>

Fix st_open() to return -ENOMEDIUM instead of -EIO if no medium is
Signed-off-by: default avatarKai Makisara <>
Signed-off-by: default avatarJames Bottomley <>
parent a24342b9
......@@ -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);
retval = (-EIO);
goto err_out;
return 0;
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