diff options
author | Poul-Henning Kamp <phk@FreeBSD.org> | 1999-05-08 06:40:31 +0000 |
---|---|---|
committer | Poul-Henning Kamp <phk@FreeBSD.org> | 1999-05-08 06:40:31 +0000 |
commit | 4be2eb8c49a786d78796ed36e7ceaa8fdb198b27 (patch) | |
tree | dd19261ed7efb2709a39ec70feaa9147f1b247d7 /sys/kern/tty_snoop.c | |
parent | da8f43d1fccac244520b8fa56ef6911e25074351 (diff) | |
download | src-4be2eb8c49a786d78796ed36e7ceaa8fdb198b27.tar.gz src-4be2eb8c49a786d78796ed36e7ceaa8fdb198b27.zip |
I got tired of seeing all the cdevsw[major(foo)] all over the place.
Made a new (inline) function devsw(dev_t dev) and substituted it.
Changed to the BDEV variant to this format as well: bdevsw(dev_t dev)
DEVFS will eventually benefit from this change too.
Notes
Notes:
svn path=/head/; revision=46676
Diffstat (limited to 'sys/kern/tty_snoop.c')
-rw-r--r-- | sys/kern/tty_snoop.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/kern/tty_snoop.c b/sys/kern/tty_snoop.c index ebffb2a28e2d..204088c639e1 100644 --- a/sys/kern/tty_snoop.c +++ b/sys/kern/tty_snoop.c @@ -71,7 +71,7 @@ snpdevtotty (dev) maj = major(dev); if ((u_int)maj >= nchrdev) return (NULL); - cdp = cdevsw[maj]; + cdp = devsw(dev); if (cdp == NULL) return (NULL); return ((*cdp->d_devtotty)(dev)); |