_devname in src/usr.sbin/sysinstall/devices.c

Brian A. Seklecki lavalamp at spiritual-machines.org
Wed Feb 20 19:09:39 UTC 2008


All:

Does anyone know the relationship between this structure (major, minor,
delta, etc.) and real device IDs?  Obviously devd(8) isn't running in
the MFS install kernel, but I assume the magic still happens.

Also, I don't see that major/minors indexed here actually matching a
booted SMP kernel?

$ ls /dev/mfi*
crw-r-----  1 root  operator    0,  32 Dec 14 13:16 /dev/mfi0
crw-r-----  1 root  operator    0,  85 Dec 14 13:16 /dev/mfid0
crw-r-----  1 root  operator    0,  87 Dec 14 13:16 /dev/mfid0s1
crw-r-----  1 root  operator    0,  95 Dec 14 13:16 /dev/mfid0s1a
[...snip...]
crw-r-----  1 root  operator    0, 101 Dec 14 13:16 /dev/mfid0s1g
crw-r-----  1 root  operator    0,  86 Dec 14 13:16 /dev/mfid1

But devices.c lists the major as:
  
{ DEVICE_TYPE_DISK, "mfid%d", "LSI MegaRAID SAS", 254, 65538, 8, 4 },


I'm pretty sure neither 254 and/or 32/85 are match the major on the
boot/install MFS kernel.   They don't seem to be related, yet when i
screw with struct{} _devname, I break device detection, so it is still
used in some way.

I'm fuzzy on how these M/M are used in FreeBSD -- I missed the whole
auto-magic assignment period during the 5x days.





More information about the freebsd-questions mailing list