diff options
author | Poul-Henning Kamp <phk@FreeBSD.org> | 1999-05-11 19:55:07 +0000 |
---|---|---|
committer | Poul-Henning Kamp <phk@FreeBSD.org> | 1999-05-11 19:55:07 +0000 |
commit | bfbb9ce67005673c7b7c8b2267024adef44f7d1d (patch) | |
tree | 9ffcbddb82416102ac7aed6b4c9c9b5bf02d13e3 /sys/kern/subr_diskmbr.c | |
parent | ac9a7ff18c4b3ed2974b52ffccdddff73dfd5cad (diff) | |
download | src-bfbb9ce67005673c7b7c8b2267024adef44f7d1d.tar.gz src-bfbb9ce67005673c7b7c8b2267024adef44f7d1d.zip |
Divorce "dev_t" from the "major|minor" bitmap, which is now called
udev_t in the kernel but still called dev_t in userland.
Provide functions to manipulate both types:
major() umajor()
minor() uminor()
makedev() umakedev()
dev2udev() udev2dev()
For now they're functions, they will become in-line functions
after one of the next two steps in this process.
Return major/minor/makedev to macro-hood for userland.
Register a name in cdevsw[] for the "filedescriptor" driver.
In the kernel the udev_t appears in places where we have the
major/minor number combination, (ie: a potential device: we
may not have the driver nor the device), like in inodes, vattr,
cdevsw registration and so on, whereas the dev_t appears where
we carry around a reference to a actual device.
In the future the cdevsw and the aliased-from vnode will be hung
directly from the dev_t, along with up to two softc pointers for
the device driver and a few houskeeping bits. This will essentially
replace the current "alias" check code (same buck, bigger bang).
A little stunt has been provided to try to catch places where the
wrong type is being used (dev_t vs udev_t), if you see something
not working, #undef DEVT_FASCIST in kern/kern_conf.c and see if
it makes a difference. If it does, please try to track it down
(many hands make light work) or at least try to reproduce it
as simply as possible, and describe how to do that.
Without DEVT_FASCIST I belive this patch is a no-op.
Stylistic/posixoid comments about the userland view of the <sys/*.h>
files welcome now, from userland they now contain the end result.
Next planned step: make all dev_t's refer to the same devsw[] which
means convert BLK's to CHR's at the perimeter of the vnodes and
other places where they enter the game (bootdev, mknod, sysctl).
Notes
Notes:
svn path=/head/; revision=47028
Diffstat (limited to 'sys/kern/subr_diskmbr.c')
-rw-r--r-- | sys/kern/subr_diskmbr.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/kern/subr_diskmbr.c b/sys/kern/subr_diskmbr.c index 752ec10d5054..c05e66bd83c4 100644 --- a/sys/kern/subr_diskmbr.c +++ b/sys/kern/subr_diskmbr.c @@ -35,10 +35,11 @@ * * from: @(#)ufs_disksubr.c 7.16 (Berkeley) 5/4/91 * from: ufs_disksubr.c,v 1.8 1994/06/07 01:21:39 phk Exp $ - * $Id: diskslice_machdep.c,v 1.32 1998/12/04 22:54:46 archie Exp $ + * $Id: diskslice_machdep.c,v 1.33 1999/01/28 01:59:53 dillon Exp $ */ #include <sys/param.h> +#include <sys/systm.h> #include <sys/buf.h> #include <sys/conf.h> #include <sys/disklabel.h> @@ -48,7 +49,6 @@ #include <sys/diskslice.h> #include <sys/malloc.h> #include <sys/syslog.h> -#include <sys/systm.h> #define TRACE(str) do { if (dsi_debug) printf str; } while (0) |