Re: SCSI device numbering (was: Re: Ideas for v2.1

Harald Koenig (koenig@tat.physik.uni-tuebingen.de)
Fri, 21 Jun 1996 10:24:57 +0200 (MET DST)


> Eric Youngdale (eric@aib.com) wrote:
> :
> : Sigh. This is why I wrote scsidev. Take a look on tsx-11 in
> : pub/linux/ALPHA/scsi. People may argue as to whether this is the correct
> : approach, but it solves the problem you describe.
> :
> : [scsidev updates /dev/scsi/* at boot time]

being curious I've looked into scsidev-1.3.tar.gz which I've picked up
some time ago and played a bit with it. here are a few patches for
problems I found (plus fix for compilation with Linux-2.0.0):

-------------------------------------------------------------------------------
--- scsidev-1.3/Makefile.ORIG Sun Feb 25 18:00:42 1996
+++ scsidev-1.3/Makefile Fri Jun 21 09:28:31 1996
@@ -1,6 +1,6 @@
BINDIR=/usr/local/bin
MANDIR=/usr/local/man
-CFLAGS=-g # -DDEBUG
+CFLAGS=-O2 -g -I/usr/src/linux/include/ # -DDEBUG

scsidev: scsidev.c
${CC} ${CFLAGS} -o scsidev scsidev.c
--- scsidev-1.3/scsidev.c.ORIG Sun Mar 31 18:44:39 1996
+++ scsidev-1.3/scsidev.c Fri Jun 21 09:27:42 1996
@@ -8,7 +8,7 @@
#include <errno.h>
#include <strings.h>

-#include <linux/scsi.h>
+#include <scsi/scsi.h>
#include <getopt.h>

int use_symlink = 0;
@@ -590,8 +590,9 @@
}
else
{
- while( *pnt != ',' && *pnt != ' ' && *pnt != '\t' ) pnt++;
- *pnt++ = 0;
+ while( *pnt && *pnt != ',' && *pnt != ' ' && *pnt != '\t' ) pnt++;
+ if (*pnt)
+ *pnt++ = 0;
}

while (*pnt == ' ' || *pnt == '\t') pnt++;
@@ -777,7 +778,7 @@
}
else
{
- fprintf(stderr,"Unrecognized specifier \"%s\" on line\n", pnt,
+ fprintf(stderr,"Unrecognized specifier \"%s\" on line %d\n", pnt,
line);
break;
}
@@ -975,7 +976,7 @@
int status, i;
unsigned char *cmd;
unsigned char * pagestart;
- unsigned char buffer[1024];
+ unsigned char buffer[1024+8];
char path[64];
int infile;
struct regnames * rpnt1;

-- 
All SCSI disks will from now on                     ___       _____
be required to send an email notice                0--,|    /OOOOOOO\
24 hours prior to complete hardware failure!      <_/  /  /OOOOOOOOOOO\
                                                    \  \/OOOOOOOOOOOOOOO\
                                                      \ OOOOOOOOOOOOOOOOO|//
Harald Koenig,                                         \/\/\/\/\/\/\/\/\/
Inst.f.Theoret.Astrophysik                              //  /     \\  \
koenig@tat.physik.uni-tuebingen.de                     ^^^^^       ^^^^^