Here: fix for NCR5380.c

Ray Van Tassle-CRV004 (Ray_Van_Tassle-CRV004@email.mot.com)
Fri, 25 Oct 1996 8:25:39 -0500


Thanks to a dying SCSI disk drive on a PAS16 controller, I discovered a bug
in the error handling, which causes Linux to crash. Here's the fix. This
patch is to 2.0.22, but it should also just slide right in to 2.0.23 and 2.1.
5.

Regards,
Ray Van Tassle


--- linux2.0.23/drivers/scsi/NCR5380.c.2022 Mon Apr 29 09:14:19 1996
+++ linux2.0.23/drivers/scsi/NCR5380.c Thu Oct 24 18:07:58 1996
@@ -734,7 +734,7 @@
*/

static void NCR5380_print_status (struct Scsi_Host *instance) {
- char pr_bfr[256];
+ char pr_bfr[512];
char *start;
int len;

@@ -767,7 +767,7 @@
*/

#undef SPRINTF
-#define SPRINTF(args...) do { if(pos < buffer + length) pos += sprintf(pos,
## args); } while(0)
+#define SPRINTF(args...) do { if(pos < buffer + length-80) pos +=
sprintf(pos, ## args); } while(0)
static
char *lprint_Scsi_Cmnd (Scsi_Cmnd *cmd, char *pos, char *buffer, int
length);
static