Henning Meier-Geinitz wrote: > Hi, > > On Mon, Feb 25, 2002 at 01:30:32PM +0100, Oliver Rauch wrote: > >>Henning Meier-Geinitz wrote: >> >> >>>Is anybody against the following patch? >>> >>>+ #define FIND_DEVICES_TOUCH_FILE "/dev/sg0" >>> >> >>May be this should be a list: >> >>/dev/sg0, /dev/sga are both relevant for linux, >> > > Are they really relevant any more? Even the oldest box I could find > (SuSE system from 1997, kernel 2.0.3x) had only /dev/sg0...7 and no > /dev/sga etc. I remember that some systems had symlinks sga --> sg0 > but how old are the real sga devices? Newer then /proc/scsi/scsi?
The sg driver internally switched from alphabetical (e.g. /dev/sga) to numeric (e.g. /dev/sg0) notation in sg version 2.1.38 which was dated 2000/05/27. That first appeared in linux kernel 2.2.16 . Prior to that distributions where already setting up /dev entries (with mknod) for sg<n> where "n" is numeric. It shouldn't hurt to probe both. Just one suggestion: you should open sg devices O_NONBLOCK when probing lest you hang on some other application's exclusive lock (e.g. cdrecord). If a non-blocking open fails with an errno of EBUSY then leave that device alone. >>what about /dev/uk0 - are there any modules when uk0 is used? >> > > Aren't those only used on *BSD? As we are talking about kernel modules > and /proc/scsi/scsi this looks pretty Linux-only for me. I don't know where these /dev/uk<n> device names came from. Any char device name with a major number of 21 is a hook to the sg driver. Doug Gilbert
