summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormpp <mpp@FreeBSD.org>1997-02-12 16:46:25 +0000
committermpp <mpp@FreeBSD.org>1997-02-12 16:46:25 +0000
commitf27596dab09b8a86a13cd548a07a6739cf10da18 (patch)
tree05a17df22903ea4a24cb39b85f0a189cd3a46b5a
parent21ce6b86e8549e004a5ff0cae8748dcc4bc41480 (diff)
downloadFreeBSD-src-f27596dab09b8a86a13cd548a07a6739cf10da18.zip
FreeBSD-src-f27596dab09b8a86a13cd548a07a6739cf10da18.tar.gz
This no longer depends on NFS being defined so that it
can check for an NFS root. With Lite2, the file system type can be checked by checking if the rootfs name == "nfs".
-rw-r--r--sys/i386/i386/swapgeneric.c11
1 files changed, 3 insertions, 8 deletions
diff --git a/sys/i386/i386/swapgeneric.c b/sys/i386/i386/swapgeneric.c
index 5307255..44cfbe4 100644
--- a/sys/i386/i386/swapgeneric.c
+++ b/sys/i386/i386/swapgeneric.c
@@ -40,6 +40,7 @@
#include <sys/param.h>
#include <sys/conf.h>
#include <sys/buf.h>
+#include <sys/mount.h>
#include <sys/systm.h>
#include <sys/reboot.h>
#include <sys/disklabel.h>
@@ -77,11 +78,6 @@ struct swdevt swdevt[] = {
int dmmin, dmmax, dmtext;
#endif
-#ifdef NFS
-extern int (*mountroot) __P((void));
-extern int nfs_mountroot __P((void));
-#endif
-
void gets __P((char *));
struct genericconf {
@@ -147,8 +143,8 @@ bad:
printf("use dk%%d\n");
goto retry;
}
-#ifdef NFS
- if (mountroot == nfs_mountroot) {
+ /* XXX */
+ if (strcmp(mountrootfsname, "nfs") == 0) {
/*
* The NFS code in nfs_vfsops.c handles root and swap
* for us if we're booting diskless. This is just to
@@ -157,7 +153,6 @@ bad:
dumplo = -1;
return;
}
-#endif
unit = 0;
for (gc = genericconf; gc->gc_name; gc++) {
for (bd = 0; bd < nblkdev; bd++) {
OpenPOWER on IntegriCloud