diff -uNr linux-2.4.18.S18.scsiboot/drivers/scsi/scsi.c linux-2.4.18.S18.scsiswitch/drivers/scsi/scsi.c --- linux-2.4.18.S18.scsiboot/drivers/scsi/scsi.c Sat Jul 13 18:48:49 2002 +++ linux-2.4.18.S18.scsiswitch/drivers/scsi/scsi.c Tue Jul 16 01:24:00 2002 @@ -126,6 +126,9 @@ */ unsigned int scsi_logging_level; +/* Flag for extended /proc/scsi/scsi format */ +int scsi_rep_hldev; + const char *const scsi_device_types[MAX_SCSI_DEVICE_CODE] = { "Direct-Access ", @@ -1665,6 +1668,18 @@ goto out; /* + * Usage: echo "scsi report-devs X" > /proc/scsi/scsi + * to enable (X!=0) or disable (X=0) the extended /proc/scsi/scsi format + */ + if (!strncmp("report-devs", buffer + 5, 11)) { + p = buffer + 17; + + switch (*p) { + case '0': scsi_rep_hldev = 0; goto out; + default: scsi_rep_hldev = 1; goto out; + } + } + /* * Usage: echo "scsi dump #N" > /proc/scsi/scsi * to dump status of all scsi commands. The number is used to specify the level * of detail in the dump. diff -uNr linux-2.4.18.S18.scsiboot/drivers/scsi/scsi_proc.c linux-2.4.18.S18.scsiswitch/drivers/scsi/scsi_proc.c --- linux-2.4.18.S18.scsiboot/drivers/scsi/scsi_proc.c Thu Jun 20 18:08:40 2002 +++ linux-2.4.18.S18.scsiswitch/drivers/scsi/scsi_proc.c Sat Jul 13 19:17:35 2002 @@ -256,6 +256,9 @@ return (cmdIndex); } +/* Flag for extended /proc/scsi/scsi format */ +extern int scsi_rep_hldev; + void proc_print_scsidevice(Scsi_Device * scd, char *buffer, int *size, int len) { @@ -301,6 +304,11 @@ else y += sprintf(buffer + len + y, "\n"); + if (!scsi_rep_hldev) { + *size = y; + return; + } + /* Report high level devices attached */ y += sprintf (buffer + len + y, " Attached drivers:");