patch-2.4.20 linux-2.4.20/drivers/scsi/sr_ioctl.c

Next file: linux-2.4.20/drivers/scsi/st.c
Previous file: linux-2.4.20/drivers/scsi/sr.c
Back to the patch index
Back to the overall index

diff -urN linux-2.4.19/drivers/scsi/sr_ioctl.c linux-2.4.20/drivers/scsi/sr_ioctl.c
@@ -158,13 +158,11 @@
 			if (!quiet)
 				printk(KERN_ERR "sr%d: CDROM (ioctl) reports ILLEGAL "
 				       "REQUEST.\n", target);
+			err = -EIO;
 			if (SRpnt->sr_sense_buffer[12] == 0x20 &&
-			    SRpnt->sr_sense_buffer[13] == 0x00) {
+			    SRpnt->sr_sense_buffer[13] == 0x00)
 				/* sense: Invalid command operation code */
 				err = -EDRIVE_CANT_DO_THIS;
-			} else {
-				err = -EINVAL;
-			}
 #ifdef DEBUG
 			print_command(sr_cmd);
 			print_req_sense("sr", SRpnt);

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)