Re: PATCH ncr5380/53c400, lp module

Kevin Lentin (kevinl@cs.monash.edu.au)
Fri, 22 Mar 1996 12:28:53 +1100 (EST)


Ulrich Windl Wrote ...
>
> > +const char *const scsi_device_types[] =
> > +{
> > + "Direct-Access ",
> > + "Sequential-Access",
> > + "Printer ",
> > + "Processor ",
> > + "WORM ",
> > + "CD-ROM ",
> > + "Scanner ",
> > + "Optical Device ",
> > + "Medium Changer ",
> > + "Communications "
> > +};
> > +#define MAX_SCSI_DEVICE_CODE sizeof(scsi_device_types)/sizeof(char*)
>
> Aren't these strings already defined somewhere else in the SCSI
> directory?

Yes and I will #ifdef around them for the next version. I use the driver as
a module and all other places where that list is defined seem to be private
or part of something that is much bigger. I think there are 3 or 4
different lists like this with different names. It's a pain.

The best solution would be to put it in a common file. BUT it's a
definition of an array and hence needs to be in a .c file which means weird
things as far as modules go. I also didn't want to go fiddling in about a
dozen different people's SCSI drivers where I didn't belong.

A solution that works for all SCSI drivers whether in the kernel or modules
would be nice.

-- 
[=======================================================================]
[ Kevin Lentin                 |finger kevinl@fangorn.cs.monash.edu.au| ]
[ K.Lentin@cs.monash.edu.au    |for PGP public key block. Fingerprint | ]
[ Macintrash: 'Just say NO!'   |6024308DE1F84314  811B511DBA6FD596    | ]
[=======================================================================]