Module Name:    src
Committed By:   dsl
Date:           Mon May 21 21:34:16 UTC 2012

Modified Files:
        src/sys/arch/i386/stand/lib: exec.c
        src/sys/arch/sandpoint/stand/altboot: main.c
        src/sys/lib/libsa: ext2fs.c ffsv1.c ffsv2.c globals.c lfsv1.c lfsv2.c
            stand.h ufs.c

Log Message:
Remove the code that tries to load the "ffs" kernel module during boot.
This is in line with the core decision than even modular kernels should
  contain the ffs code.
I've left in the code that tries to load "nfs" and "ext2fs", but it
  isn't clear that is necessary.
Removes a warning message that (usually) flashes past to fast to read.
AFAICT all the relevant kernels contain ffs (and nfs for that matter).


To generate a diff of this commit:
cvs rdiff -u -r1.49 -r1.50 src/sys/arch/i386/stand/lib/exec.c
cvs rdiff -u -r1.20 -r1.21 src/sys/arch/sandpoint/stand/altboot/main.c
cvs rdiff -u -r1.12 -r1.13 src/sys/lib/libsa/ext2fs.c
cvs rdiff -u -r1.5 -r1.6 src/sys/lib/libsa/ffsv1.c src/sys/lib/libsa/ffsv2.c
cvs rdiff -u -r1.8 -r1.9 src/sys/lib/libsa/globals.c
cvs rdiff -u -r1.4 -r1.5 src/sys/lib/libsa/lfsv1.c src/sys/lib/libsa/lfsv2.c
cvs rdiff -u -r1.75 -r1.76 src/sys/lib/libsa/stand.h
cvs rdiff -u -r1.57 -r1.58 src/sys/lib/libsa/ufs.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/arch/i386/stand/lib/exec.c
diff -u src/sys/arch/i386/stand/lib/exec.c:1.49 src/sys/arch/i386/stand/lib/exec.c:1.50
--- src/sys/arch/i386/stand/lib/exec.c:1.49	Mon Nov 28 07:56:54 2011
+++ src/sys/arch/i386/stand/lib/exec.c	Mon May 21 21:34:16 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: exec.c,v 1.49 2011/11/28 07:56:54 tls Exp $	 */
+/*	$NetBSD: exec.c,v 1.50 2012/05/21 21:34:16 dsl Exp $	 */
 
 /*-
  * Copyright (c) 2008, 2009 The NetBSD Foundation, Inc.
@@ -297,10 +297,9 @@ common_load_kernel(const char *file, u_l
 
 	close(fd);
 
-	/* Now we know the root fs type, load modules for it. */
-	module_add(fsmod);
-	if (fsmod2 != NULL && strcmp(fsmod, fsmod2) != 0)
-		module_add(fsmod2);
+	/* If the root fs type is unusual, load its module. */
+	if (fsmod != NULL)
+		module_add(fsmod);
 
 	/*
 	 * Gather some information for the kernel. Do this after the

Index: src/sys/arch/sandpoint/stand/altboot/main.c
diff -u src/sys/arch/sandpoint/stand/altboot/main.c:1.20 src/sys/arch/sandpoint/stand/altboot/main.c:1.21
--- src/sys/arch/sandpoint/stand/altboot/main.c:1.20	Fri Apr 27 00:35:43 2012
+++ src/sys/arch/sandpoint/stand/altboot/main.c	Mon May 21 21:34:16 2012
@@ -1,4 +1,4 @@
-/* $NetBSD: main.c,v 1.20 2012/04/27 00:35:43 nisimura Exp $ */
+/* $NetBSD: main.c,v 1.21 2012/05/21 21:34:16 dsl Exp $ */
 
 /*-
  * Copyright (c) 2007 The NetBSD Foundation, Inc.
@@ -353,9 +353,8 @@ main(int argc, char *argv[], char *boota
 		}
 
 		if (modules_enabled) {
-			module_add(fsmod);
-			if (fsmod2 != NULL && strcmp(fsmod, fsmod2) != 0)
-				module_add(fsmod2);
+			if (fsmod != NULL)
+				module_add(fsmod);
 			kmodloadp = marks[MARK_END];
 			btinfo_modulelist = NULL;
 			module_load(bname);

Index: src/sys/lib/libsa/ext2fs.c
diff -u src/sys/lib/libsa/ext2fs.c:1.12 src/sys/lib/libsa/ext2fs.c:1.13
--- src/sys/lib/libsa/ext2fs.c:1.12	Mon Jan 16 18:44:13 2012
+++ src/sys/lib/libsa/ext2fs.c	Mon May 21 21:34:16 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: ext2fs.c,v 1.12 2012/01/16 18:44:13 christos Exp $	*/
+/*	$NetBSD: ext2fs.c,v 1.13 2012/05/21 21:34:16 dsl Exp $	*/
 
 /*
  * Copyright (c) 1997 Manuel Bouyer.
@@ -713,10 +713,8 @@ ext2fs_open(const char *path, struct ope
 out:
 	if (rc)
 		ext2fs_close(f);
-	else {
+	else
 		fsmod = "ext2fs";
-		fsmod2 = "ffs";
-	}
 	return rc;
 }
 

Index: src/sys/lib/libsa/ffsv1.c
diff -u src/sys/lib/libsa/ffsv1.c:1.5 src/sys/lib/libsa/ffsv1.c:1.6
--- src/sys/lib/libsa/ffsv1.c:1.5	Sun Dec 25 06:09:08 2011
+++ src/sys/lib/libsa/ffsv1.c	Mon May 21 21:34:16 2012
@@ -1,4 +1,4 @@
-/* $NetBSD: ffsv1.c,v 1.5 2011/12/25 06:09:08 tsutsui Exp $ */
+/* $NetBSD: ffsv1.c,v 1.6 2012/05/21 21:34:16 dsl Exp $ */
 
 #define LIBSA_FFSv1
 
@@ -15,6 +15,4 @@
 #define ufs_dinode	ufs1_dinode
 #define indp_t		int32_t
 
-#define	FSMOD		"ffs"
-
 #include "ufs.c"
Index: src/sys/lib/libsa/ffsv2.c
diff -u src/sys/lib/libsa/ffsv2.c:1.5 src/sys/lib/libsa/ffsv2.c:1.6
--- src/sys/lib/libsa/ffsv2.c:1.5	Sun Dec 25 06:09:08 2011
+++ src/sys/lib/libsa/ffsv2.c	Mon May 21 21:34:16 2012
@@ -1,4 +1,4 @@
-/* $NetBSD: ffsv2.c,v 1.5 2011/12/25 06:09:08 tsutsui Exp $ */
+/* $NetBSD: ffsv2.c,v 1.6 2012/05/21 21:34:16 dsl Exp $ */
 
 #define LIBSA_FFSv2
 
@@ -15,6 +15,4 @@
 #define ufs_dinode	ufs2_dinode
 #define indp_t		int64_t
 
-#define	FSMOD		"ffs"
-
 #include "ufs.c"

Index: src/sys/lib/libsa/globals.c
diff -u src/sys/lib/libsa/globals.c:1.8 src/sys/lib/libsa/globals.c:1.9
--- src/sys/lib/libsa/globals.c:1.8	Wed Nov 19 12:36:41 2008
+++ src/sys/lib/libsa/globals.c	Mon May 21 21:34:16 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: globals.c,v 1.8 2008/11/19 12:36:41 ad Exp $	*/
+/*	$NetBSD: globals.c,v 1.9 2012/05/21 21:34:16 dsl Exp $	*/
 
 /*
  *	globals.c:
@@ -19,8 +19,7 @@ u_char	bcea[6] = BA;			/* broadcast ethe
 char	rootpath[FNAME_SIZE];		/* root mount path */
 char	bootfile[FNAME_SIZE];		/* bootp says to boot this */
 char	hostname[FNAME_SIZE];		/* our hostname */
-char	*fsmod =  "ffs";		/* guessed file system module name */
-char	*fsmod2;			/* a requisite module */
+char	*fsmod = NULL;			/*  file system module name to load */
 struct	in_addr myip;			/* my ip address */
 struct	in_addr rootip;			/* root ip address */
 struct	in_addr gateip;			/* swap ip address */

Index: src/sys/lib/libsa/lfsv1.c
diff -u src/sys/lib/libsa/lfsv1.c:1.4 src/sys/lib/libsa/lfsv1.c:1.5
--- src/sys/lib/libsa/lfsv1.c:1.4	Sun Dec 25 06:09:08 2011
+++ src/sys/lib/libsa/lfsv1.c	Mon May 21 21:34:16 2012
@@ -1,4 +1,4 @@
-/* $NetBSD: lfsv1.c,v 1.4 2011/12/25 06:09:08 tsutsui Exp $ */
+/* $NetBSD: lfsv1.c,v 1.5 2012/05/21 21:34:16 dsl Exp $ */
 
 #define	LIBSA_LFS
 #define	REQUIRED_LFS_VERSION	1
@@ -20,6 +20,5 @@
 #define	INOPBx(fs) INOPB(fs)
 
 #define	FSMOD			"lfs"
-#define	FSMOD2			"ffs"
 
 #include "lib/libsa/ufs.c"
Index: src/sys/lib/libsa/lfsv2.c
diff -u src/sys/lib/libsa/lfsv2.c:1.4 src/sys/lib/libsa/lfsv2.c:1.5
--- src/sys/lib/libsa/lfsv2.c:1.4	Sun Dec 25 06:09:08 2011
+++ src/sys/lib/libsa/lfsv2.c	Mon May 21 21:34:16 2012
@@ -1,4 +1,4 @@
-/* $NetBSD: lfsv2.c,v 1.4 2011/12/25 06:09:08 tsutsui Exp $ */
+/* $NetBSD: lfsv2.c,v 1.5 2012/05/21 21:34:16 dsl Exp $ */
 
 #define	LIBSA_LFS
 #define	REQUIRED_LFS_VERSION	2
@@ -23,6 +23,5 @@
 #endif
 
 #define	FSMOD			"lfs"
-#define	FSMOD2			"ffs"
 
 #include "lib/libsa/ufs.c"

Index: src/sys/lib/libsa/stand.h
diff -u src/sys/lib/libsa/stand.h:1.75 src/sys/lib/libsa/stand.h:1.76
--- src/sys/lib/libsa/stand.h:1.75	Mon Jan 16 18:44:13 2012
+++ src/sys/lib/libsa/stand.h	Mon May 21 21:34:16 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: stand.h,v 1.75 2012/01/16 18:44:13 christos Exp $	*/
+/*	$NetBSD: stand.h,v 1.76 2012/05/21 21:34:16 dsl Exp $	*/
 
 /*
  * Copyright (c) 1999 Christopher G. Demetriou.  All rights reserved.
@@ -111,7 +111,6 @@ struct open_file;
  * independent way.
  */
 extern char *fsmod;
-extern char *fsmod2;
 
 #if !defined(LIBSA_SINGLE_FILESYSTEM)
 struct fs_ops {

Index: src/sys/lib/libsa/ufs.c
diff -u src/sys/lib/libsa/ufs.c:1.57 src/sys/lib/libsa/ufs.c:1.58
--- src/sys/lib/libsa/ufs.c:1.57	Mon Jan 16 18:44:13 2012
+++ src/sys/lib/libsa/ufs.c	Mon May 21 21:34:16 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: ufs.c,v 1.57 2012/01/16 18:44:13 christos Exp $	*/
+/*	$NetBSD: ufs.c,v 1.58 2012/05/21 21:34:16 dsl Exp $	*/
 
 /*-
  * Copyright (c) 1993
@@ -770,14 +770,10 @@ ufs_open(const char *path, struct open_f
 out:
 	if (rc)
 		ufs_close(f);
-	else {
-#ifdef FSMOD
+#ifdef FSMOD		/* Only defined for lfs */
+	else
 		fsmod = FSMOD;
 #endif
-#ifdef FSMOD2
-		fsmod2 = FSMOD2;
-#endif
-	}
 	return rc;
 }
 

Reply via email to