11-27-2001
9,926,
461
Join Date: Aug 2001
Last Activity: 26 February 2016, 12:31 PM EST
Location: Ashburn, Virginia
Posts: 9,926
Thanks Given: 63
Thanked 461 Times in 270 Posts
The -k lists everything in the kernel's internal data structures. The -u lists usable entries.
Yes, when you limit things to disks, they are the same. But compare "ioscan -ufn" and "ioscan -kfn". With the -k, you will see entries for cpu and memory. There are no drivers for cpus and memory (/dev/mem is a psuedo driver). We also have some UNCLAIMED entries on our -k listing since we have some hardware connected that doesn't have a driver. Until a driver claims them, those devices are also unusable.
So the -u and -k are indeed different. But "-kC disk" and "-uC disk" are indeed redundant. By the time the kernel knows an entry is a disk, it must also be usable. "Usable" in this context means the kernel can attempt an open on the device, not that the device is working properly.
I'm not absolutely certain that it is impossible to create an unusable disk entry in the kernel, but there is no documented way to do so. But if /etc/ioconfig is badly garbled, maybe ioinit could do it at boot time. Also ioscan, insf, rmsf,...etc all work by opening /dev/config and sending undocumented ioclt's to it. I'm not sure how much checking is done so maybe a program could open /dev/config and fiddle with it.