summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorbde <bde@FreeBSD.org>1997-09-07 16:21:11 +0000
committerbde <bde@FreeBSD.org>1997-09-07 16:21:11 +0000
commitbcade9a9035125a9249e03bbdaccb94f1d84ffc7 (patch)
treee467faa382879278c2ee894344a80c6c0ef297b5
parentcaa2e7e2da294fd9afa91fec5201e2e7cd44ba9b (diff)
downloadFreeBSD-src-bcade9a9035125a9249e03bbdaccb94f1d84ffc7.zip
FreeBSD-src-bcade9a9035125a9249e03bbdaccb94f1d84ffc7.tar.gz
Removed yet more vestiges of config-time swap configuration and/or
cleaned up nearby cruft.
-rw-r--r--sys/fs/cd9660/cd9660_vfsops.c11
-rw-r--r--sys/gnu/ext2fs/ext2_vfsops.c10
-rw-r--r--sys/gnu/fs/ext2fs/ext2_vfsops.c10
-rw-r--r--sys/isofs/cd9660/cd9660_vfsops.c11
-rw-r--r--sys/kern/vfs_export.c5
-rw-r--r--sys/kern/vfs_subr.c5
-rw-r--r--sys/miscfs/devfs/devfs_tree.c6
-rw-r--r--sys/sys/systm.h5
-rw-r--r--sys/ufs/ffs/ffs_vfsops.c7
-rw-r--r--sys/ufs/lfs/lfs_vfsops.c12
-rw-r--r--sys/ufs/mfs/mfs_vfsops.c9
-rw-r--r--sys/vm/vm_swap.c24
12 files changed, 44 insertions, 71 deletions
diff --git a/sys/fs/cd9660/cd9660_vfsops.c b/sys/fs/cd9660/cd9660_vfsops.c
index a0cea9d..c652ab1 100644
--- a/sys/fs/cd9660/cd9660_vfsops.c
+++ b/sys/fs/cd9660/cd9660_vfsops.c
@@ -36,7 +36,7 @@
* SUCH DAMAGE.
*
* @(#)cd9660_vfsops.c 8.18 (Berkeley) 5/22/95
- * $Id: cd9660_vfsops.c,v 1.26 1997/08/02 14:31:20 bde Exp $
+ * $Id: cd9660_vfsops.c,v 1.27 1997/08/16 19:15:00 wollman Exp $
*/
#include <sys/param.h>
@@ -148,15 +148,10 @@ iso_mountroot(mp, p)
struct iso_args args;
int error;
- /*
- * Get vnode for rootdev.
- */
- if ((error = bdevvp(swapdev, &swapdev_vp)) ||
- (error = bdevvp(rootdev, &rootvp))) {
- printf("iso_mountroot: can't setup bdevvp's");
+ if ((error = bdevvp(rootdev, &rootvp))) {
+ printf("iso_mountroot: can't find rootvp");
return (error);
}
-
args.flags = ISOFSMNT_ROOT;
args.ssector = iso_get_ssector(rootdev, p);
if (bootverbose)
diff --git a/sys/gnu/ext2fs/ext2_vfsops.c b/sys/gnu/ext2fs/ext2_vfsops.c
index 55b5508..7aef5f6 100644
--- a/sys/gnu/ext2fs/ext2_vfsops.c
+++ b/sys/gnu/ext2fs/ext2_vfsops.c
@@ -141,12 +141,10 @@ ext2_mountroot()
u_int size;
int error;
- /*
- * Get vnodes for swapdev and rootdev.
- */
- if (bdevvp(swapdev, &swapdev_vp) || bdevvp(rootdev, &rootvp))
- panic("ext2_mountroot: can't setup bdevvp's");
-
+ if ((error = bdevvp(rootdev, &rootvp))) {
+ printf("ext2_mountroot: can't find rootvp");
+ return (error);
+ }
mp = bsd_malloc((u_long)sizeof(struct mount), M_MOUNT, M_WAITOK);
bzero((char *)mp, (u_long)sizeof(struct mount));
mp->mnt_op = &ext2fs_vfsops;
diff --git a/sys/gnu/fs/ext2fs/ext2_vfsops.c b/sys/gnu/fs/ext2fs/ext2_vfsops.c
index 55b5508..7aef5f6 100644
--- a/sys/gnu/fs/ext2fs/ext2_vfsops.c
+++ b/sys/gnu/fs/ext2fs/ext2_vfsops.c
@@ -141,12 +141,10 @@ ext2_mountroot()
u_int size;
int error;
- /*
- * Get vnodes for swapdev and rootdev.
- */
- if (bdevvp(swapdev, &swapdev_vp) || bdevvp(rootdev, &rootvp))
- panic("ext2_mountroot: can't setup bdevvp's");
-
+ if ((error = bdevvp(rootdev, &rootvp))) {
+ printf("ext2_mountroot: can't find rootvp");
+ return (error);
+ }
mp = bsd_malloc((u_long)sizeof(struct mount), M_MOUNT, M_WAITOK);
bzero((char *)mp, (u_long)sizeof(struct mount));
mp->mnt_op = &ext2fs_vfsops;
diff --git a/sys/isofs/cd9660/cd9660_vfsops.c b/sys/isofs/cd9660/cd9660_vfsops.c
index a0cea9d..c652ab1 100644
--- a/sys/isofs/cd9660/cd9660_vfsops.c
+++ b/sys/isofs/cd9660/cd9660_vfsops.c
@@ -36,7 +36,7 @@
* SUCH DAMAGE.
*
* @(#)cd9660_vfsops.c 8.18 (Berkeley) 5/22/95
- * $Id: cd9660_vfsops.c,v 1.26 1997/08/02 14:31:20 bde Exp $
+ * $Id: cd9660_vfsops.c,v 1.27 1997/08/16 19:15:00 wollman Exp $
*/
#include <sys/param.h>
@@ -148,15 +148,10 @@ iso_mountroot(mp, p)
struct iso_args args;
int error;
- /*
- * Get vnode for rootdev.
- */
- if ((error = bdevvp(swapdev, &swapdev_vp)) ||
- (error = bdevvp(rootdev, &rootvp))) {
- printf("iso_mountroot: can't setup bdevvp's");
+ if ((error = bdevvp(rootdev, &rootvp))) {
+ printf("iso_mountroot: can't find rootvp");
return (error);
}
-
args.flags = ISOFSMNT_ROOT;
args.ssector = iso_get_ssector(rootdev, p);
if (bootverbose)
diff --git a/sys/kern/vfs_export.c b/sys/kern/vfs_export.c
index fb71b96..687ec28 100644
--- a/sys/kern/vfs_export.c
+++ b/sys/kern/vfs_export.c
@@ -36,7 +36,7 @@
* SUCH DAMAGE.
*
* @(#)vfs_subr.c 8.31 (Berkeley) 5/26/95
- * $Id: vfs_subr.c,v 1.99 1997/09/03 13:29:41 phk Exp $
+ * $Id: vfs_subr.c,v 1.100 1997/09/07 13:49:49 bde Exp $
*/
/*
@@ -703,8 +703,7 @@ reassignbuf(bp, newvp)
#ifndef DEVFS_ROOT
/*
* Create a vnode for a block device.
- * Used for root filesystem and swap areas.
- * Also used for memory file system special devices.
+ * Used for mounting the root file system.
*/
int
bdevvp(dev, vpp)
diff --git a/sys/kern/vfs_subr.c b/sys/kern/vfs_subr.c
index fb71b96..687ec28 100644
--- a/sys/kern/vfs_subr.c
+++ b/sys/kern/vfs_subr.c
@@ -36,7 +36,7 @@
* SUCH DAMAGE.
*
* @(#)vfs_subr.c 8.31 (Berkeley) 5/26/95
- * $Id: vfs_subr.c,v 1.99 1997/09/03 13:29:41 phk Exp $
+ * $Id: vfs_subr.c,v 1.100 1997/09/07 13:49:49 bde Exp $
*/
/*
@@ -703,8 +703,7 @@ reassignbuf(bp, newvp)
#ifndef DEVFS_ROOT
/*
* Create a vnode for a block device.
- * Used for root filesystem and swap areas.
- * Also used for memory file system special devices.
+ * Used for mounting the root file system.
*/
int
bdevvp(dev, vpp)
diff --git a/sys/miscfs/devfs/devfs_tree.c b/sys/miscfs/devfs/devfs_tree.c
index 5d4290e..798bfdd 100644
--- a/sys/miscfs/devfs/devfs_tree.c
+++ b/sys/miscfs/devfs/devfs_tree.c
@@ -2,7 +2,7 @@
/*
* Written by Julian Elischer (julian@DIALix.oz.au)
*
- * $Header: /home/ncvs/src/sys/miscfs/devfs/devfs_tree.c,v 1.38 1997/08/26 17:17:52 julian Exp $
+ * $Header: /home/ncvs/src/sys/miscfs/devfs/devfs_tree.c,v 1.39 1997/09/07 13:49:56 bde Exp $
*/
#include "opt_devfs.h"
@@ -868,10 +868,8 @@ findbdev(dev_t dev, dn_p dir)
/*
* Create a vnode for a block device.
- * Used for root filesystem and swap areas.
- * Also used for memory file system special devices.
+ * Used for mounting the root file system.
*/
-
int
bdevvp(dev_t dev, struct vnode **vpp)
{
diff --git a/sys/sys/systm.h b/sys/sys/systm.h
index 5b5efc0..74a4a6d 100644
--- a/sys/sys/systm.h
+++ b/sys/sys/systm.h
@@ -36,7 +36,7 @@
* SUCH DAMAGE.
*
* @(#)systm.h 8.7 (Berkeley) 3/29/95
- * $Id: systm.h,v 1.56 1997/08/20 05:19:34 fsmp Exp $
+ * $Id: systm.h,v 1.57 1997/09/07 09:43:44 bde Exp $
*/
#ifndef _SYS_SYSTM_H_
@@ -67,8 +67,7 @@ extern long dumplo; /* offset into dumpdev */
extern dev_t rootdev; /* root device */
extern struct vnode *rootvp; /* vnode equivalent to above */
-extern dev_t swapdev; /* swapping device */
-extern struct vnode *swapdev_vp;/* vnode equivalent to above */
+extern struct vnode *swapdev_vp;/* vnode for swap device */
extern int boothowto; /* reboot flags, from console subsystem */
extern int bootverbose; /* nonzero to print verbose messages */
diff --git a/sys/ufs/ffs/ffs_vfsops.c b/sys/ufs/ffs/ffs_vfsops.c
index 14ef397..a835da5 100644
--- a/sys/ufs/ffs/ffs_vfsops.c
+++ b/sys/ufs/ffs/ffs_vfsops.c
@@ -31,7 +31,7 @@
* SUCH DAMAGE.
*
* @(#)ffs_vfsops.c 8.31 (Berkeley) 5/20/95
- * $Id: ffs_vfsops.c,v 1.53 1997/08/16 19:16:20 wollman Exp $
+ * $Id: ffs_vfsops.c,v 1.54 1997/09/02 20:06:46 bde Exp $
*/
#include "opt_quota.h"
@@ -150,9 +150,8 @@ ffs_mount( mp, path, data, ndp, p)
***
*/
- /* Get vnode for root device*/
- if ((err = bdevvp( rootdev, &rootvp))) {
- printf("ffs_mountroot: can't setup bdevvp for root");
+ if ((err = bdevvp(rootdev, &rootvp))) {
+ printf("ffs_mountroot: can't find rootvp");
return (err);
}
diff --git a/sys/ufs/lfs/lfs_vfsops.c b/sys/ufs/lfs/lfs_vfsops.c
index b4fef3d..a0bf515 100644
--- a/sys/ufs/lfs/lfs_vfsops.c
+++ b/sys/ufs/lfs/lfs_vfsops.c
@@ -31,7 +31,7 @@
* SUCH DAMAGE.
*
* @(#)lfs_vfsops.c 8.20 (Berkeley) 6/10/95
- * $Id: lfs_vfsops.c,v 1.20 1997/08/02 14:33:21 bde Exp $
+ * $Id: lfs_vfsops.c,v 1.21 1997/08/16 19:16:23 wollman Exp $
*/
#include "opt_quota.h"
@@ -99,12 +99,8 @@ lfs_mountroot()
struct proc *p = curproc; /* XXX */
int error;
- /*
- * Get vnodes for swapdev and rootdev.
- */
- if ((error = bdevvp(swapdev, &swapdev_vp)) ||
- (error = bdevvp(rootdev, &rootvp))) {
- printf("lfs_mountroot: can't setup bdevvp's");
+ if ((error = bdevvp(rootdev, &rootvp))) {
+ printf("lfs_mountroot: can't find rootvp");
return (error);
}
if (error = vfs_rootmountalloc("lfs", "root_device", &mp))
@@ -189,7 +185,7 @@ lfs_mount(mp, path, data, ndp, p)
*/
/* XXX -- implement*/
- panic("lfs_mountroot: can't setup bdevvp for root");
+ panic("lfs_mount: NULL path not implemented");
}
/*
diff --git a/sys/ufs/mfs/mfs_vfsops.c b/sys/ufs/mfs/mfs_vfsops.c
index 5f4f371..0b05469 100644
--- a/sys/ufs/mfs/mfs_vfsops.c
+++ b/sys/ufs/mfs/mfs_vfsops.c
@@ -31,7 +31,7 @@
* SUCH DAMAGE.
*
* @(#)mfs_vfsops.c 8.11 (Berkeley) 6/19/95
- * $Id: mfs_vfsops.c,v 1.30 1997/04/28 09:15:18 jkh Exp $
+ * $Id: mfs_vfsops.c,v 1.31 1997/09/02 20:06:55 bde Exp $
*/
#include <sys/param.h>
@@ -272,11 +272,8 @@ mfs_mount(mp, path, data, ndp, p)
rootdev = makedev(255, mfs_minor++);
printf("rootfs is %ld Kbyte compiled in MFS\n",
mfs_rootsize/1024);
-
-
- /* Get vnode for root device*/
- if (err = bdevvp( rootdev, &rootvp)) {
- printf("mfs_mountroot: can't setup bdevvp for rootdev");
+ if ((err = bdevvp(rootdev, &rootvp))) {
+ printf("mfs_mountroot: can't find rootvp");
return (err);
}
diff --git a/sys/vm/vm_swap.c b/sys/vm/vm_swap.c
index 48b572b..bff7fb2 100644
--- a/sys/vm/vm_swap.c
+++ b/sys/vm/vm_swap.c
@@ -31,7 +31,7 @@
* SUCH DAMAGE.
*
* @(#)vm_swap.c 8.5 (Berkeley) 2/17/94
- * $Id: vm_swap.c,v 1.44 1997/08/31 07:32:39 phk Exp $
+ * $Id: vm_swap.c,v 1.45 1997/09/01 03:17:30 bde Exp $
*/
#include <sys/param.h>
@@ -55,6 +55,16 @@
#include <miscfs/specfs/specdev.h>
+/*
+ * "sw" is a fake device implemented
+ * in vm_swap.c and used only internally to get to swstrategy.
+ * It cannot be provided to the users, because the
+ * swstrategy routine munches the b_dev and b_blkno entries
+ * before calling the appropriate driver. This would horribly
+ * confuse, e.g. the hashing routines. Instead, /dev/drum is
+ * provided as a character (raw) device.
+ */
+
static void swstrategy __P((struct buf *));
#define CDEV_MAJOR 4
@@ -71,17 +81,7 @@ static struct cdevsw sw_cdevsw =
noselect, nommap, swstrategy, "sw",
&sw_bdevsw, -1 };
-
-/*
- * Swapdev is a fake device implemented
- * in sw.c used only internally to get to swstrategy.
- * It cannot be provided to the users, because the
- * swstrategy routine munches the b_dev and b_blkno entries
- * before calling the appropriate driver. This would horribly
- * confuse, e.g. the hashing routines. Instead, /dev/drum is
- * provided as a character (raw) device.
- */
-dev_t swapdev = makedev(BDEV_MAJOR, 0);
+static dev_t swapdev = makedev(BDEV_MAJOR, 0);
/*
* Indirect driver for multi-controller paging.
OpenPOWER on IntegriCloud