Module Name:    src
Committed By:   pooka
Date:           Fri Jul 31 18:50:58 UTC 2009

Modified Files:
        src/sys/miscfs/fdesc: fdesc_vnops.c

Log Message:
Do a name-based search for the ctty major instead of requiring an
external symbol.


To generate a diff of this commit:
cvs rdiff -u -r1.107 -r1.108 src/sys/miscfs/fdesc/fdesc_vnops.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/miscfs/fdesc/fdesc_vnops.c
diff -u src/sys/miscfs/fdesc/fdesc_vnops.c:1.107 src/sys/miscfs/fdesc/fdesc_vnops.c:1.108
--- src/sys/miscfs/fdesc/fdesc_vnops.c:1.107	Sun May 24 21:41:26 2009
+++ src/sys/miscfs/fdesc/fdesc_vnops.c	Fri Jul 31 18:50:58 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: fdesc_vnops.c,v 1.107 2009/05/24 21:41:26 ad Exp $	*/
+/*	$NetBSD: fdesc_vnops.c,v 1.108 2009/07/31 18:50:58 pooka Exp $	*/
 
 /*
  * Copyright (c) 1992, 1993
@@ -41,7 +41,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: fdesc_vnops.c,v 1.107 2009/05/24 21:41:26 ad Exp $");
+__KERNEL_RCSID(0, "$NetBSD: fdesc_vnops.c,v 1.108 2009/07/31 18:50:58 pooka Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -176,8 +176,6 @@
 const struct vnodeopv_desc fdesc_vnodeop_opv_desc =
 	{ &fdesc_vnodeop_p, fdesc_vnodeop_entries };
 
-extern const struct cdevsw ctty_cdevsw;
-
 /*
  * Initialise cache headers
  */
@@ -187,7 +185,7 @@
 	int cttymajor;
 
 	/* locate the major number */
-	cttymajor = cdevsw_lookup_major(&ctty_cdevsw);
+	cttymajor = devsw_name2chr("ctty", NULL, 0);
 	devctty = makedev(cttymajor, 0);
 	fdhashtbl = hashinit(NFDCACHE, HASH_LIST, true, &fdhash);
 }

Reply via email to