patch-2.0.11 linux/drivers/scsi/sg.c

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

diff -u --recursive --new-file v2.0.10/linux/drivers/scsi/sg.c linux/drivers/scsi/sg.c
@@ -276,7 +276,7 @@
      * wrong.
      */
     memcpy(device->header.sense_buffer, SCpnt->sense_buffer, sizeof(SCpnt->sense_buffer));
-    device->header.result=SCpnt->result;
+    device->header.result = (SCpnt->sense_buffer[0] == 0 ? 0 : EIO);
 
     /*
      * Now wake up the process that is waiting for the

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov