Because destroy_all_dev() checks the mask/match against the device's si_udev,
authorMatthew Dillon <dillon@dragonflybsd.org>
Wed, 23 Mar 2005 02:50:53 +0000 (02:50 +0000)
committerMatthew Dillon <dillon@dragonflybsd.org>
Wed, 23 Mar 2005 02:50:53 +0000 (02:50 +0000)
commitd969b1385e45921275af3b243f11c04d0e7aea05
tree35d4291b3647a8d3352a8322217951d7d81988f1
parent13cb830da45e444f5c050fabee56b95fff533935
Because destroy_all_dev() checks the mask/match against the device's si_udev,
which is a field combining both major and minor numbers, we must mask off the
major bits (to retain only the minor bits) from the 'mask' variable in order
to allow a generic -1 to be passed as the mask.  Otherwise we will not match
anything.

Revamp a good chunk of the documentation to try to make the major/minor
number masking issues clear.

Bug-found-by: Chuck Tuffli <chuck_tuffli@agilent.com>
sys/kern/kern_conf.c
sys/kern/kern_device.c