Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

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

[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: default avatarKai Makisara <kai.makisara@kolumbus.fi>
Signed-off-by: default avatarJames Bottomley <James.Bottomley@SteelEye.com>
parent a24342b9
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -1177,6 +1177,9 @@ static int st_open(struct inode *inode, struct file *filp)
		goto err_out;
	if ((filp->f_flags & O_NONBLOCK) == 0 &&
	    retval != CHKRES_READY) {
		if (STp->ready == NO_TAPE)
			retval = (-ENOMEDIUM);
		else
			retval = (-EIO);
		goto err_out;
	}