1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-12-24 11:29:10 +00:00
freebsd/sys/kern
Poul-Henning Kamp bfbb9ce670 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).
1999-05-11 19:55:07 +00:00
..
bus_if.m * Augment the interface language to allow arbitrary C code to be 'passed 1999-05-10 17:06:14 +00:00
device_if.m * Augment the interface language to allow arbitrary C code to be 'passed 1999-05-10 17:06:14 +00:00
imgact_aout.c
imgact_elf.c
imgact_gzip.c
imgact_shell.c
inflate.c
init_main.c Use colons instead of semi-colons to behave like UNIX instead of DOS. 1999-05-11 10:08:10 +00:00
init_sysent.c
kern_acct.c
kern_clock.c
kern_conf.c Divorce "dev_t" from the "major|minor" bitmap, which is now called 1999-05-11 19:55:07 +00:00
kern_descrip.c Divorce "dev_t" from the "major|minor" bitmap, which is now called 1999-05-11 19:55:07 +00:00
kern_environment.c
kern_exec.c
kern_exit.c
kern_fork.c
kern_intr.c
kern_jail.c
kern_ktrace.c
kern_linker.c
kern_lock.c
kern_lockf.c
kern_malloc.c
kern_mib.c
kern_module.c
kern_ntptime.c
kern_physio.c
kern_proc.c Divorce "dev_t" from the "major|minor" bitmap, which is now called 1999-05-11 19:55:07 +00:00
kern_prot.c
kern_random.c
kern_resource.c
kern_shutdown.c
kern_sig.c
kern_subr.c
kern_synch.c
kern_syscalls.c
kern_sysctl.c
kern_tc.c
kern_threads.c
kern_time.c
kern_timeout.c
kern_xxx.c
ksched.c
link_aout.c
link_elf_obj.c
link_elf.c
Make.tags.inc
makedevops.pl Remove hack to accept French spelling of METHOD (METHODE) 1999-05-10 17:45:49 +00:00
Makefile
makesyscalls.sh
md5c.c
p1003_1b.c
posix4_mib.c
subr_autoconf.c
subr_blist.c
subr_bus.c * Augment the interface language to allow arbitrary C code to be 'passed 1999-05-10 17:06:14 +00:00
subr_clist.c
subr_devstat.c
subr_disklabel.c
subr_diskmbr.c Divorce "dev_t" from the "major|minor" bitmap, which is now called 1999-05-11 19:55:07 +00:00
subr_diskslice.c Divorce "dev_t" from the "major|minor" bitmap, which is now called 1999-05-11 19:55:07 +00:00
subr_dkbad.c Divorce "dev_t" from the "major|minor" bitmap, which is now called 1999-05-11 19:55:07 +00:00
subr_log.c
subr_module.c
subr_param.c
subr_prf.c
subr_prof.c
subr_rman.c
subr_scanf.c
subr_smp.c
subr_trap.c
subr_xxx.c
sys_generic.c
sys_pipe.c
sys_process.c
sys_socket.c
syscalls.c
syscalls.master
sysv_ipc.c
sysv_msg.c
sysv_sem.c
sysv_shm.c
tty_compat.c
tty_conf.c
tty_cons.c
tty_pty.c
tty_snoop.c Use NODEV instead of -1 1999-05-10 18:10:08 +00:00
tty_subr.c
tty_tb.c
tty_tty.c
tty.c
uipc_domain.c
uipc_mbuf.c
uipc_proto.c
uipc_sockbuf.c Update one set of comments.. s/so_q0/so_incomp/ and s/so_q/so_comp/ (that's 1999-05-10 18:15:40 +00:00
uipc_socket2.c Update one set of comments.. s/so_q0/so_incomp/ and s/so_q/so_comp/ (that's 1999-05-10 18:15:40 +00:00
uipc_socket.c
uipc_syscalls.c
uipc_usrreq.c Divorce "dev_t" from the "major|minor" bitmap, which is now called 1999-05-11 19:55:07 +00:00
vfs_aio.c
vfs_bio.c
vfs_cache.c
vfs_cluster.c
vfs_conf.c
vfs_default.c
vfs_export.c Divorce "dev_t" from the "major|minor" bitmap, which is now called 1999-05-11 19:55:07 +00:00
vfs_extattr.c
vfs_init.c
vfs_lookup.c
vfs_mount.c
vfs_subr.c Divorce "dev_t" from the "major|minor" bitmap, which is now called 1999-05-11 19:55:07 +00:00
vfs_syscalls.c
vfs_vnops.c
vnode_if.pl
vnode_if.sh
vnode_if.src