patch-1.3.67 linux/drivers/scsi/aha152x.c
Next file: linux/drivers/scsi/scsi.c
Previous file: linux/drivers/net/slip.h
Back to the patch index
Back to the overall index
-  Lines: 16
 -  Date:
Mon Feb 19 13:29:08 1996
 -  Orig file: 
v1.3.66/linux/drivers/scsi/aha152x.c
 -  Orig date: 
Fri Jan 26 01:37:06 1996
 
diff -u --recursive --new-file v1.3.66/linux/drivers/scsi/aha152x.c linux/drivers/scsi/aha152x.c
@@ -2958,8 +2958,13 @@
     scd = scd->next;
   }
   
-  *start=buffer;
-  return (pos-buffer < length ? pos-buffer : length);     
+  *start=buffer+offset;
+  if (pos - buffer < offset)
+    return 0;
+  else if (pos - buffer - offset < length)
+    return pos - buffer - offset;
+  else
+    return length;
 }
 
 #ifdef MODULE
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov
with Sam's (original) version of this