Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/gehenna-devsw]: src/sys/compat/linux/arch/i386 Replace the direct-access...



details:   https://anonhg.NetBSD.org/src/rev/3300be970524
branches:  gehenna-devsw
changeset: 527049:3300be970524
user:      gehenna <gehenna%NetBSD.org@localhost>
date:      Thu May 16 04:27:03 2002 +0000

description:
Replace the direct-access to devsw table with calling devsw API.
Replace the block major -> name conversion function with devsw API.

diffstat:

 sys/compat/linux/arch/i386/linux_machdep.c |  10 +++++-----
 1 files changed, 5 insertions(+), 5 deletions(-)

diffs (45 lines):

diff -r 195d54c051bc -r 3300be970524 sys/compat/linux/arch/i386/linux_machdep.c
--- a/sys/compat/linux/arch/i386/linux_machdep.c        Thu May 16 04:24:11 2002 +0000
+++ b/sys/compat/linux/arch/i386/linux_machdep.c        Thu May 16 04:27:03 2002 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: linux_machdep.c,v 1.76 2002/05/13 05:35:47 simonb Exp $        */
+/*     $NetBSD: linux_machdep.c,v 1.76.2.1 2002/05/16 04:27:03 gehenna Exp $   */
 
 /*-
  * Copyright (c) 1995, 2000 The NetBSD Foundation, Inc.
@@ -37,7 +37,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: linux_machdep.c,v 1.76 2002/05/13 05:35:47 simonb Exp $");
+__KERNEL_RCSID(0, "$NetBSD: linux_machdep.c,v 1.76.2.1 2002/05/16 04:27:03 gehenna Exp $");
 
 #if defined(_KERNEL_OPT)
 #include "opt_vm86.h"
@@ -120,7 +120,6 @@
 
 static struct biosdisk_info *fd2biosinfo __P((struct proc *, struct file *));
 extern struct disklist *i386_alldisks;
-extern const char *findblkname __P((int));
 
 /*
  * Deal with some i386-specific things in the Linux emulation code.
@@ -557,7 +556,8 @@
 {
        if (raw) {
 #if (NWSDISPLAY > 0)
-               if (major(dev) == NETBSD_WSCONS_MAJOR)
+               extern const struct cdevsw wsdisplay_cdevsw;
+               if (cdevsw_lookup(dev) == &wsdisplay_cdevsw)
                        return makedev(LINUX_CONS_MAJOR, (minor(dev) + 1));
 #endif
                return 0;
@@ -665,7 +665,7 @@
        if (vp->v_type != VBLK)
                return NULL;
 
-       blkname = findblkname(major(vp->v_rdev));
+       blkname = devsw_blk2name(major(vp->v_rdev));
        snprintf(diskname, sizeof diskname, "%s%u", blkname,
            DISKUNIT(vp->v_rdev));
 



Home | Main Index | Thread Index | Old Index