Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 20 Aug 1996 11:02:21 +1000
From:      Bruce Evans <bde@zeta.org.au>
To:        julian@freefall.freebsd.org, pst@jnx.com
Cc:        committers@freebsd.org, hackers@freebsd.org
Subject:   Re: cvs commit:  src/sys/kern kern_conf.c uipc_socket2.c
Message-ID:  <199608200102.LAA01327@godzilla.zeta.org.au>

next in thread | raw e-mail | index | archive | help
>It would be a good thing(tm) if the #define CDEV_MAJOR and
>#define BDEV_MAJOR definitions were completely removed from all .c files.

They should go away (when device numbers in inodes go away), so don't
spend much time fixing them.

>Instead, configure should read in the files config/majors and
>i386/config/majors.i386 and produce a bunch of "major_xxx.h" files,
>each with a #define XXX_CDEV_MAJOR <n> values.

There should be at most one majors.h file.  Drivers don't need to know
their own numbers, but kern_conf.c needs to know until the numbers go
away.  This can be implemented using table lookup.  E.g.,
cdevsw_add_devsw(dev_t *dev, int bdev, struct cdevsw *dp) could have
been simply cdevsw_add_devsw(struct cdevsw *dp).  dp->d_name gives the
name of the device, which can be looked up in a table in majors.h.  It's
probably not worth implementing this now, since the whole interface will
have to change (all device info should be in one struct managed by devfs
and this struct will be passed around instead of dev_t's or devswitch
pointers.

>Why am I suggesting this?  Majors.XXX is not being kept up to date for things
>that require fixed major numbers.  I know, DEVFS and fully dynmic major
>numbers fixes this.  I'm not holding my breath.

Neither is devices.i386 (it's missing at least ccd) :-(.

Bruce



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199608200102.LAA01327>