diff options
author | phk <phk@FreeBSD.org> | 1999-05-09 08:18:12 +0000 |
---|---|---|
committer | phk <phk@FreeBSD.org> | 1999-05-09 08:18:12 +0000 |
commit | 2ed2581bdfdcedbe89555243ef72ce98610dbc23 (patch) | |
tree | 5570eadee77294ef2ff47de9fe7df8eb418f8807 /sys/kern/kern_conf.c | |
parent | 09fa1aef8027ca5df775d1a7fd84abf44d636271 (diff) | |
download | FreeBSD-src-2ed2581bdfdcedbe89555243ef72ce98610dbc23.zip FreeBSD-src-2ed2581bdfdcedbe89555243ef72ce98610dbc23.tar.gz |
Peter beat me to half this patch, but didn't do the other half:
set d_bmaj
don't cast a dev_t to int before comparing to NODEV
Diffstat (limited to 'sys/kern/kern_conf.c')
-rw-r--r-- | sys/kern/kern_conf.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/sys/kern/kern_conf.c b/sys/kern/kern_conf.c index d5614e8..13952c3 100644 --- a/sys/kern/kern_conf.c +++ b/sys/kern/kern_conf.c @@ -30,7 +30,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id: kern_conf.c,v 1.33 1999/05/08 06:39:35 phk Exp $ + * $Id: kern_conf.c,v 1.34 1999/05/09 08:10:17 peter Exp $ */ #include <sys/param.h> @@ -72,7 +72,7 @@ cdevsw_add(dev_t *descrip, { int i ; - if ( (int)*descrip == NODEV) { /* auto (0 is valid) */ + if ( *descrip == NODEV) { /* auto (0 is valid) */ /* * Search the table looking for a slot... */ @@ -107,12 +107,13 @@ cdevsw_add(dev_t *descrip, } void -cdevsw_add_generic(int bmaj, int cmaj, struct cdevsw *cdevsw) +cdevsw_add_generic(int bmaj, int cmaj, struct cdevsw *devsw) { dev_t dev; dev = makedev(cmaj, 0); - cdevsw_add(&dev, cdevsw, NULL); + cdevsw_add(&dev, devsw, NULL); + cdevsw[cmaj]->d_bmaj = bmaj; bmaj2cmaj[bmaj] = cmaj; } |