Module Name: src Committed By: pooka Date: Sun May 2 11:01:03 UTC 2010
Modified Files: src/sys/kern: kern_module.c Log Message: If a builtin dependency is missing, error instead of panic. As pointed out by martin, configurations like builtin nfsserver can be succesfully linked without including all dependencies (specifically, nfs). Until all such weirdosities are fixed, opt for at least a semifunctional system. To generate a diff of this commit: cvs rdiff -u -r1.64 -r1.65 src/sys/kern/kern_module.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/kern/kern_module.c diff -u src/sys/kern/kern_module.c:1.64 src/sys/kern/kern_module.c:1.65 --- src/sys/kern/kern_module.c:1.64 Mon Apr 19 11:20:56 2010 +++ src/sys/kern/kern_module.c Sun May 2 11:01:03 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: kern_module.c,v 1.64 2010/04/19 11:20:56 jruoho Exp $ */ +/* $NetBSD: kern_module.c,v 1.65 2010/05/02 11:01:03 pooka Exp $ */ /*- * Copyright (c) 2008 The NetBSD Foundation, Inc. @@ -34,7 +34,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: kern_module.c,v 1.64 2010/04/19 11:20:56 jruoho Exp $"); +__KERNEL_RCSID(0, "$NetBSD: kern_module.c,v 1.65 2010/05/02 11:01:03 pooka Exp $"); #define _MODULE_INTERNAL @@ -687,8 +687,15 @@ } /* Note! This is from TAILQ, not immediate above */ - if (mi == NULL) - panic("can't find `%s'", name); + if (mi == NULL) { + /* + * XXX: We'd like to panic here, but currently in some + * cases (such as nfsserver + nfs), the dependee can be + * succesfully linked without the dependencies. + */ + module_error("can't find builtin dependency `%s'", name); + return ENOENT; + } /* * Initialize pre-requisites.