The SCSI disc driver will call dev_register() whenever a new disc is
found. It probably makes sense to do it right after the partition
check, so you only create device nodes for as many partitions as you
have. Done properly when you use <fdisk> to write a new partition
table, dev_register() is called again (and possibly dev_unregister()).
> > No, please don't do this. It's too confusing. What's wrong with the
> > current SCSI setup (/dev/sda, /dev/sda1, /dev/sda2, etc) in any case?
> >
> > The incosistency can be considered a bad thing. Unless some change is
> > planned for the IDE subsystem (along the same lines) consistency is a good
> > thing.
> Umm... the IDE subsystem is already like this. We have
> hda - 1st channel, master
> hdb - 1st channel, slave
> hdc - 2nd channel, master
> hdd - 2nd channel, slave
> ...
>
> Then you follow those with a number indicating the paritition. The
> difference between current SCSI practice and IDE is this: If you take out
> hdb, hdc remains hdc. But if you remove sdb, sdc becomes sdb.
That's right. And it's a pain.
> > (Duh! Another thought... we could make symlinks from /dev/sda1
> > to /dev/h0c0i0l0p1 and so on and so forth. For the time being, ignore
> > what I just said about this being a bad thing...)
>
> But the question is HOW do you do this?
Well, personally I wouldn't suggest using symlinks. Since the existing
logic for SCSI disc renumbering is there, you can also call
dev_register() to create /dev/sda{1,2,3...}, /dev/sdb{1,2,3...} and so
on. Easy.
Regards,
Richard....