summaryrefslogtreecommitdiffstats
path: root/sys
diff options
context:
space:
mode:
authorphk <phk@FreeBSD.org>1994-11-12 01:47:43 +0000
committerphk <phk@FreeBSD.org>1994-11-12 01:47:43 +0000
commit624e500bacd06e51cc11262a5c872685983d6c36 (patch)
treef2f1ecfadfad39dd6831e729ec032b78656dfc48 /sys
parent5ba4b165e8f8bddc7e78b7fba016749a1ae6103f (diff)
downloadFreeBSD-src-624e500bacd06e51cc11262a5c872685983d6c36.zip
FreeBSD-src-624e500bacd06e51cc11262a5c872685983d6c36.tar.gz
Make a kernel sans FFS possible.
Diffstat (limited to 'sys')
-rw-r--r--sys/amd64/amd64/autoconf.c31
-rw-r--r--sys/i386/i386/autoconf.c31
-rw-r--r--sys/kern/vfs_conf.c13
-rw-r--r--sys/kern/vfs_mount.c13
4 files changed, 40 insertions, 48 deletions
diff --git a/sys/amd64/amd64/autoconf.c b/sys/amd64/amd64/autoconf.c
index d1b52fd..a32f564 100644
--- a/sys/amd64/amd64/autoconf.c
+++ b/sys/amd64/amd64/autoconf.c
@@ -34,7 +34,7 @@
* SUCH DAMAGE.
*
* from: @(#)autoconf.c 7.1 (Berkeley) 5/9/91
- * $Id: autoconf.c,v 1.14 1994/08/31 23:36:56 se Exp $
+ * $Id: autoconf.c,v 1.15 1994/10/22 17:51:45 phk Exp $
*/
/*
@@ -67,6 +67,14 @@ static void setroot(void);
int dkn; /* number of iostat dk numbers assigned so far */
extern int cold; /* cold start flag initialized in locore.s */
+extern int (*mountroot) __P((void));
+#ifdef FFS
+int ffs_mountroot __P((void));
+#endif
+#ifdef NFS
+int nfs_mountroot __P((void));
+#endif
+
/*
* Determine i/o configuration for a machine.
*/
@@ -84,26 +92,23 @@ configure()
pci_configure();
#endif
-#if GENERICxxx
- if ((boothowto & RB_ASKNAME) == 0)
- setroot();
- setconf();
-#else
-# ifdef NFS
+#ifdef NFS
{
extern int nfs_diskless_valid;
- extern int (*mountroot) __P((void));
- extern int nfs_mountroot(void);
if (nfs_diskless_valid)
mountroot = nfs_mountroot;
- else
+ }
+#endif /* NFS */
+#ifdef FFS
+ if (!mountroot) {
+ mountroot = ffs_mountroot;
setroot();
}
-# else /* !NFS */
- setroot();
-# endif /* NFS */
#endif
+ if (!mountroot) {
+ panic("Nobody wants to mount my root for me");
+ }
/*
* Configure swap area and related system
* parameter based on device(s) used.
diff --git a/sys/i386/i386/autoconf.c b/sys/i386/i386/autoconf.c
index d1b52fd..a32f564 100644
--- a/sys/i386/i386/autoconf.c
+++ b/sys/i386/i386/autoconf.c
@@ -34,7 +34,7 @@
* SUCH DAMAGE.
*
* from: @(#)autoconf.c 7.1 (Berkeley) 5/9/91
- * $Id: autoconf.c,v 1.14 1994/08/31 23:36:56 se Exp $
+ * $Id: autoconf.c,v 1.15 1994/10/22 17:51:45 phk Exp $
*/
/*
@@ -67,6 +67,14 @@ static void setroot(void);
int dkn; /* number of iostat dk numbers assigned so far */
extern int cold; /* cold start flag initialized in locore.s */
+extern int (*mountroot) __P((void));
+#ifdef FFS
+int ffs_mountroot __P((void));
+#endif
+#ifdef NFS
+int nfs_mountroot __P((void));
+#endif
+
/*
* Determine i/o configuration for a machine.
*/
@@ -84,26 +92,23 @@ configure()
pci_configure();
#endif
-#if GENERICxxx
- if ((boothowto & RB_ASKNAME) == 0)
- setroot();
- setconf();
-#else
-# ifdef NFS
+#ifdef NFS
{
extern int nfs_diskless_valid;
- extern int (*mountroot) __P((void));
- extern int nfs_mountroot(void);
if (nfs_diskless_valid)
mountroot = nfs_mountroot;
- else
+ }
+#endif /* NFS */
+#ifdef FFS
+ if (!mountroot) {
+ mountroot = ffs_mountroot;
setroot();
}
-# else /* !NFS */
- setroot();
-# endif /* NFS */
#endif
+ if (!mountroot) {
+ panic("Nobody wants to mount my root for me");
+ }
/*
* Configure swap area and related system
* parameter based on device(s) used.
diff --git a/sys/kern/vfs_conf.c b/sys/kern/vfs_conf.c
index 6e1eb1d..251d704 100644
--- a/sys/kern/vfs_conf.c
+++ b/sys/kern/vfs_conf.c
@@ -31,22 +31,13 @@
* SUCH DAMAGE.
*
* @(#)vfs_conf.c 8.8 (Berkeley) 3/31/94
- * $Id: vfs_conf.c,v 1.4 1994/09/19 15:41:13 dfr Exp $
+ * $Id: vfs_conf.c,v 1.5 1994/09/21 03:46:47 wollman Exp $
*/
#include <sys/param.h>
#include <sys/mount.h>
#include <sys/vnode.h>
-#ifdef FFS
-#include <ufs/ffs/ffs_extern.h>
-
-/*
- * This specifies the filesystem used to mount the root.
- * This specification should be done by /etc/config.
- */
-int (*mountroot)() = ffs_mountroot;
-#endif
-
+int (*mountroot) __P((void));
struct vnode *rootvnode;
diff --git a/sys/kern/vfs_mount.c b/sys/kern/vfs_mount.c
index 6e1eb1d..251d704 100644
--- a/sys/kern/vfs_mount.c
+++ b/sys/kern/vfs_mount.c
@@ -31,22 +31,13 @@
* SUCH DAMAGE.
*
* @(#)vfs_conf.c 8.8 (Berkeley) 3/31/94
- * $Id: vfs_conf.c,v 1.4 1994/09/19 15:41:13 dfr Exp $
+ * $Id: vfs_conf.c,v 1.5 1994/09/21 03:46:47 wollman Exp $
*/
#include <sys/param.h>
#include <sys/mount.h>
#include <sys/vnode.h>
-#ifdef FFS
-#include <ufs/ffs/ffs_extern.h>
-
-/*
- * This specifies the filesystem used to mount the root.
- * This specification should be done by /etc/config.
- */
-int (*mountroot)() = ffs_mountroot;
-#endif
-
+int (*mountroot) __P((void));
struct vnode *rootvnode;
OpenPOWER on IntegriCloud