Do a name-based search for the ctty major instead of requiring an

external symbol.
This commit is contained in:
pooka 2009-07-31 18:50:58 +00:00
parent af1b79236a
commit 2ebc149961

View File

@ -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_entry_desc fdesc_vnodeop_entries[] = {
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 @@ fdesc_init(void)
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);
}