From 500e41bd7127ee03db75cd2a3704b8025c24e345 Mon Sep 17 00:00:00 2001 From: phk Date: Sat, 8 May 1999 06:40:31 +0000 Subject: 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. --- sys/kern/tty_snoop.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'sys/kern/tty_snoop.c') diff --git a/sys/kern/tty_snoop.c b/sys/kern/tty_snoop.c index ebffb2a..204088c 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)); -- cgit v1.1