Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 18 Sep 2003 07:58:43 -0700 (PDT)
From:      Andrew Reisse <areisse@FreeBSD.org>
To:        Perforce Change Reviews <perforce@freebsd.org>
Subject:   PERFORCE change 38229 for review
Message-ID:  <200309181458.h8IEwhjR050460@repoman.freebsd.org>

next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=38229

Change 38229 by areisse@areisse_tislabs on 2003/09/18 07:58:07

	new tunable: kern.linker.require_preloads
	if set, panic when preloaded modules don't load.

Affected files ...

.. //depot/projects/trustedbsd/sebsd/sys/kern/kern_linker.c#6 edit

Differences ...

==== //depot/projects/trustedbsd/sebsd/sys/kern/kern_linker.c#6 (text+ko) ====

@@ -62,6 +62,9 @@
  */
 static const char 	*linker_basename(const char *path);
 
+static int require_preload = 0;
+TUNABLE_INT ("kern.linker.require_preloads", &require_preload);
+
 /* Metadata from the static kernel */
 SET_DECLARE(modmetadata_set, struct mod_metadata);
 
@@ -1274,6 +1277,8 @@
 	 */
 	TAILQ_FOREACH(lf, &loaded_files, loaded) {
 		printf("KLD file %s is missing dependencies\n", lf->filename);
+		if (require_preload)
+			panic ("Required modules failed to load");
 		linker_file_unload(lf);
 		TAILQ_REMOVE(&loaded_files, lf, loaded);
 	}
@@ -1316,6 +1321,8 @@
 		if (error) {
 			printf("KLD file %s - could not finalize loading\n",
 			    lf->filename);
+			if (require_preload)
+				panic ("Required modules failed to load");
 			linker_file_t next = TAILQ_NEXT (lf, loaded);
 			linker_file_unload(lf);
 			lf = next;



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200309181458.h8IEwhjR050460>