From 4d562a18fcf00a2ca43b04e1f9495695c594d734 Mon Sep 17 00:00:00 2001 From: John Birrell Date: Mon, 24 May 1999 00:30:49 +0000 Subject: - Make setroot() conditional on FFS etc, to avoid a compiler warning on systems with no FFS. - Remove all references to mfs from cpu_rootconf(). mfs_init is called prior to cpu_rootconf(), so it can set mountrootfsname to mfs and (more imporantly) set rootdev using the (bogus in Bruce's opinion) special major number of 255. --- sys/amd64/amd64/autoconf.c | 22 +++++----------------- sys/i386/i386/autoconf.c | 22 +++++----------------- 2 files changed, 10 insertions(+), 34 deletions(-) (limited to 'sys') diff --git a/sys/amd64/amd64/autoconf.c b/sys/amd64/amd64/autoconf.c index 686fef63da46..0dcad73fa944 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.121 1999/05/10 17:12:40 peter Exp $ + * $Id: autoconf.c,v 1.122 1999/05/12 07:40:50 phk Exp $ */ /* @@ -48,7 +48,6 @@ #include "opt_bootp.h" #include "opt_ffs.h" #include "opt_cd9660.h" -#include "opt_mfs.h" #include "opt_nfsroot.h" #include "opt_bus.h" #include "opt_rootdevname.h" @@ -75,10 +74,6 @@ #include -#ifdef MFS_ROOT -#include -#endif - #include "pnp.h" #if NPNP > 0 #include @@ -107,7 +102,9 @@ static void configure_final __P((void *)); static void configure_finish __P((void)); static void configure_start __P((void)); static int setdumpdev __P((dev_t dev)); +#if defined(FFS) || defined(FFS_ROOT) static void setroot __P((void)); +#endif static int setrootbyname __P((char *name)); static void gets __P((char *)); @@ -333,17 +330,6 @@ cpu_rootconf() } #endif -#ifdef MFS_ROOT - if (!mountrootfsname) { - if (bootverbose) - printf("Considering MFS root f/s.\n"); - if (mfs_getimage()) - mountrootfsname = "mfs"; - else if (bootverbose) - printf("No MFS image available as root f/s.\n"); - } -#endif - #ifdef BOOTP_NFSROOT if (!mountrootfsname && !nfs_diskless_valid) { if (bootverbose) @@ -422,6 +408,7 @@ u_long bootdev = 0; /* not a dev_t - encoding is different */ #define FDMAJOR 2 #define FDUNITSHIFT 6 +#if defined(FFS) || defined(FFS_ROOT) /* * Attempt to find the device from which we were booted. * If we can do so, and not instructed not to do so, @@ -493,6 +480,7 @@ setroot() rootdevnames[1] = malloc(strlen(sname) + 2, M_DEVBUF, M_NOWAIT); sprintf(rootdevnames[1], "%s%s", sname, partname); } +#endif static int diff --git a/sys/i386/i386/autoconf.c b/sys/i386/i386/autoconf.c index 686fef63da46..0dcad73fa944 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.121 1999/05/10 17:12:40 peter Exp $ + * $Id: autoconf.c,v 1.122 1999/05/12 07:40:50 phk Exp $ */ /* @@ -48,7 +48,6 @@ #include "opt_bootp.h" #include "opt_ffs.h" #include "opt_cd9660.h" -#include "opt_mfs.h" #include "opt_nfsroot.h" #include "opt_bus.h" #include "opt_rootdevname.h" @@ -75,10 +74,6 @@ #include -#ifdef MFS_ROOT -#include -#endif - #include "pnp.h" #if NPNP > 0 #include @@ -107,7 +102,9 @@ static void configure_final __P((void *)); static void configure_finish __P((void)); static void configure_start __P((void)); static int setdumpdev __P((dev_t dev)); +#if defined(FFS) || defined(FFS_ROOT) static void setroot __P((void)); +#endif static int setrootbyname __P((char *name)); static void gets __P((char *)); @@ -333,17 +330,6 @@ cpu_rootconf() } #endif -#ifdef MFS_ROOT - if (!mountrootfsname) { - if (bootverbose) - printf("Considering MFS root f/s.\n"); - if (mfs_getimage()) - mountrootfsname = "mfs"; - else if (bootverbose) - printf("No MFS image available as root f/s.\n"); - } -#endif - #ifdef BOOTP_NFSROOT if (!mountrootfsname && !nfs_diskless_valid) { if (bootverbose) @@ -422,6 +408,7 @@ u_long bootdev = 0; /* not a dev_t - encoding is different */ #define FDMAJOR 2 #define FDUNITSHIFT 6 +#if defined(FFS) || defined(FFS_ROOT) /* * Attempt to find the device from which we were booted. * If we can do so, and not instructed not to do so, @@ -493,6 +480,7 @@ setroot() rootdevnames[1] = malloc(strlen(sname) + 2, M_DEVBUF, M_NOWAIT); sprintf(rootdevnames[1], "%s%s", sname, partname); } +#endif static int -- cgit v1.3