Source-Changes-HG archive

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

[src/trunk]: src/sys/kern If a builtin dependency is missing, error instead o...



details:   https://anonhg.NetBSD.org/src/rev/1decf085432c
branches:  trunk
changeset: 754500:1decf085432c
user:      pooka <pooka%NetBSD.org@localhost>
date:      Sun May 02 11:01:03 2010 +0000

description:
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.

diffstat:

 sys/kern/kern_module.c |  15 +++++++++++----
 1 files changed, 11 insertions(+), 4 deletions(-)

diffs (36 lines):

diff -r 3ad814953e03 -r 1decf085432c sys/kern/kern_module.c
--- a/sys/kern/kern_module.c    Sun May 02 06:35:21 2010 +0000
+++ b/sys/kern/kern_module.c    Sun May 02 11:01:03 2010 +0000
@@ -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.



Home | Main Index | Thread Index | Old Index