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/compat/linux/linux_file.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'sys/compat/linux/linux_file.c') diff --git a/sys/compat/linux/linux_file.c b/sys/compat/linux/linux_file.c index 907e6b8..e357e15 100644 --- a/sys/compat/linux/linux_file.c +++ b/sys/compat/linux/linux_file.c @@ -25,7 +25,7 @@ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * - * $Id: linux_file.c,v 1.23 1999/01/10 23:15:35 eivind Exp $ + * $Id: linux_file.c,v 1.24 1999/05/06 18:44:20 peter Exp $ */ #include "opt_compat.h" @@ -306,7 +306,7 @@ linux_fcntl(struct proc *p, struct linux_fcntl_args *args) if ((error = VOP_GETATTR(vp, &va, p->p_ucred, p))) return error; - d_tty = cdevsw[major(va.va_rdev)]->d_devtotty; + d_tty = devsw(va.va_rdev)->d_devtotty; if (!d_tty || (!(tp = (*d_tty)(va.va_rdev)))) return EINVAL; if (args->cmd == LINUX_F_GETOWN) { -- cgit v1.1