summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
Diffstat (limited to 'sys')
-rw-r--r--sys/arch/alpha/alpha/autoconf.c29
-rw-r--r--sys/arch/amd64/amd64/autoconf.c22
-rw-r--r--sys/arch/cats/cats/autoconf.c31
-rw-r--r--sys/arch/hp300/hp300/autoconf.c29
-rw-r--r--sys/arch/hppa/hppa/autoconf.c27
-rw-r--r--sys/arch/hppa64/hppa64/autoconf.c27
-rw-r--r--sys/arch/i386/i386/autoconf.c28
-rw-r--r--sys/arch/luna88k/luna88k/autoconf.c27
-rw-r--r--sys/arch/mac68k/mac68k/autoconf.c29
-rw-r--r--sys/arch/macppc/macppc/autoconf.c27
-rw-r--r--sys/arch/mvme68k/mvme68k/autoconf.c25
-rw-r--r--sys/arch/mvme88k/mvme88k/autoconf.c26
-rw-r--r--sys/arch/mvmeppc/mvmeppc/autoconf.c27
-rw-r--r--sys/arch/sgi/sgi/autoconf.c24
-rw-r--r--sys/arch/solbourne/solbourne/autoconf.c26
-rw-r--r--sys/arch/sparc/sparc/autoconf.c26
-rw-r--r--sys/arch/sparc64/sparc64/autoconf.c21
-rw-r--r--sys/arch/vax/vax/autoconf.c7
-rw-r--r--sys/arch/vax/vax/rootfil.c28
-rw-r--r--sys/arch/zaurus/zaurus/autoconf.c31
-rw-r--r--sys/conf/swapgeneric.c6
-rw-r--r--sys/nfs/nfs_vfsops.c4
-rw-r--r--sys/nfs/swapnfs.c55
-rw-r--r--sys/sys/conf.h3
24 files changed, 35 insertions, 550 deletions
diff --git a/sys/arch/alpha/alpha/autoconf.c b/sys/arch/alpha/alpha/autoconf.c
index 14015b55556..59ce11c6fdd 100644
--- a/sys/arch/alpha/alpha/autoconf.c
+++ b/sys/arch/alpha/alpha/autoconf.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: autoconf.c,v 1.25 2005/04/21 00:15:42 deraadt Exp $ */
+/* $OpenBSD: autoconf.c,v 1.26 2005/12/27 18:31:05 miod Exp $ */
/* $NetBSD: autoconf.c,v 1.16 1996/11/13 21:13:04 cgd Exp $ */
/*
@@ -67,7 +67,6 @@ char boot_dev[128];
void parse_prom_bootdev(void);
int atoi(char *);
void setroot(void);
-void swapconf(void);
static struct device *parsedisk(char *str, int len, int defpart,
dev_t *devp);
@@ -104,32 +103,8 @@ cpu_configure()
printf("WARNING: can't figure what device matches \"%s\"\n",
boot_dev);
setroot();
- swapconf();
- cold = 0;
-}
-
-/*
- * Configure swap space and related parameters.
- */
-void
-swapconf()
-{
- struct swdevt *swp;
- int nblks, maj;
-
- for (swp = swdevt; swp->sw_dev != NODEV; swp++) {
- maj = major(swp->sw_dev);
- if (maj > nblkdev)
- break;
- if (bdevsw[maj].d_psize) {
- nblks = (*bdevsw[maj].d_psize)(swp->sw_dev);
- if (nblks != -1 &&
- (swp->sw_nblks == 0 || swp->sw_nblks > nblks))
- swp->sw_nblks = nblks;
- swp->sw_nblks = ctod(dtoc(swp->sw_nblks));
- }
- }
dumpconf();
+ cold = 0;
}
struct nam2blk {
diff --git a/sys/arch/amd64/amd64/autoconf.c b/sys/arch/amd64/amd64/autoconf.c
index e25094344e9..81804cbe4ff 100644
--- a/sys/arch/amd64/amd64/autoconf.c
+++ b/sys/arch/amd64/amd64/autoconf.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: autoconf.c,v 1.10 2005/12/13 00:18:19 jsg Exp $ */
+/* $OpenBSD: autoconf.c,v 1.11 2005/12/27 18:31:08 miod Exp $ */
/* $NetBSD: autoconf.c,v 1.1 2003/04/26 18:39:26 fvdl Exp $ */
/*-
@@ -75,7 +75,6 @@
void setroot(void);
void rootconf(void);
-void swapconf(void);
void diskconf(void);
int findblkmajor(struct device *);
char *findblkname(int);
@@ -139,28 +138,9 @@ diskconf(void)
dkcsumattach();
rootconf();
- swapconf();
dumpconf();
}
-void
-swapconf(void)
-{
- struct swdevt *swp;
- int nblks;
-
- for (swp = swdevt; swp->sw_dev != NODEV; swp++) {
- if (bdevsw[major(swp->sw_dev)].d_psize) {
- nblks =
- (*bdevsw[major(swp->sw_dev)].d_psize)(swp->sw_dev);
- if (nblks != -1 &&
- (swp->sw_nblks == 0 || swp->sw_nblks > nblks))
- swp->sw_nblks = nblks;
- swp->sw_nblks = ctod(dtoc(swp->sw_nblks));
- }
- }
-}
-
struct device *
parsedisk(str, len, defpart, devp)
char *str;
diff --git a/sys/arch/cats/cats/autoconf.c b/sys/arch/cats/cats/autoconf.c
index cadaa6c2bf0..c57f7d3b3f0 100644
--- a/sys/arch/cats/cats/autoconf.c
+++ b/sys/arch/cats/cats/autoconf.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: autoconf.c,v 1.6 2005/11/25 02:42:25 brad Exp $ */
+/* $OpenBSD: autoconf.c,v 1.7 2005/12/27 18:31:08 miod Exp $ */
/* $NetBSD: autoconf.c,v 1.2 2001/09/05 16:17:36 matt Exp $ */
/*
@@ -66,7 +66,6 @@ struct device *bootdv = NULL;
int findblkmajor(struct device *dv);
char * findblkname(int maj);
-void swapconf(void);
void rootconf(void);
void diskconf(void);
@@ -224,38 +223,10 @@ diskconf()
#endif
rootconf();
#if 0
- swapconf();
dumpconf();
#endif
}
-/*
- * Configure swap space and related parameters.
- */
-void
-swapconf()
-{
- register struct swdevt *swp;
- register int nblks;
-
- for (swp = swdevt; swp->sw_dev != NODEV; swp++) {
- int maj = major(swp->sw_dev);
-
- if (maj > nblkdev)
- break;
- if (bdevsw[maj].d_psize) {
- nblks = (*bdevsw[maj].d_psize)(swp->sw_dev);
- if (nblks != -1 &&
- (swp->sw_nblks == 0 || swp->sw_nblks > nblks))
- swp->sw_nblks = nblks;
- swp->sw_nblks = ctod(dtoc(swp->sw_nblks));
- }
- }
-}
-
-void rootconf(void);
-void diskconf(void);
-
/*
* void cpu_configure()
diff --git a/sys/arch/hp300/hp300/autoconf.c b/sys/arch/hp300/hp300/autoconf.c
index 4c3d9817567..0b26a834fd0 100644
--- a/sys/arch/hp300/hp300/autoconf.c
+++ b/sys/arch/hp300/hp300/autoconf.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: autoconf.c,v 1.33 2005/02/27 22:08:41 miod Exp $ */
+/* $OpenBSD: autoconf.c,v 1.34 2005/12/27 18:31:08 miod Exp $ */
/* $NetBSD: autoconf.c,v 1.45 1999/04/10 17:31:02 kleink Exp $ */
/*
@@ -167,7 +167,6 @@ ddlist_t dev_data_list_scsi; /* scsi controller dev_datas */
void diskconf(void);
void setroot(void);
-void swapconf(void);
void findbootdev(void);
void findbootdev_slave(ddlist_t *, int, int, int);
void setbootdev(void);
@@ -286,7 +285,7 @@ diskconf()
{
setroot();
- swapconf();
+ dumpconf();
/*
* Set bootdev based on the device we booted from.
@@ -405,30 +404,6 @@ device_register(dev, aux)
}
}
-/*
- * Configure swap space and related parameters.
- */
-void
-swapconf()
-{
- struct swdevt *swp;
- int nblks, maj;
-
- for (swp = swdevt; swp->sw_dev != NODEV; swp++) {
- maj = major(swp->sw_dev);
- if (maj > nblkdev)
- break;
- if (bdevsw[maj].d_psize) {
- nblks = (*bdevsw[maj].d_psize)(swp->sw_dev);
- if (nblks != -1 &&
- (swp->sw_nblks == 0 || swp->sw_nblks > nblks))
- swp->sw_nblks = nblks;
- swp->sw_nblks = ctod(dtoc(swp->sw_nblks));
- }
- }
- dumpconf();
-}
-
struct nam2blk {
char *name;
int maj;
diff --git a/sys/arch/hppa/hppa/autoconf.c b/sys/arch/hppa/hppa/autoconf.c
index 0bb5f69efdc..1c9d0ea8325 100644
--- a/sys/arch/hppa/hppa/autoconf.c
+++ b/sys/arch/hppa/hppa/autoconf.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: autoconf.c,v 1.43 2005/01/17 22:33:40 mickey Exp $ */
+/* $OpenBSD: autoconf.c,v 1.44 2005/12/27 18:31:08 miod Exp $ */
/*
* Copyright (c) 1998-2003 Michael Shalayeff
@@ -65,7 +65,6 @@
#endif
void setroot(void);
-void swapconf(void);
void dumpconf(void);
int findblkmajor(struct device *dv);
@@ -113,7 +112,6 @@ cpu_configure(void)
spl0();
setroot();
- swapconf();
dumpconf();
if (cold_hook)
(*cold_hook)(HPPA_COLD_HOT);
@@ -172,29 +170,6 @@ heartbeat(v)
#endif
/*
- * Configure swap space and related parameters.
- */
-void
-swapconf(void)
-{
- struct swdevt *swp;
- int nblks, maj;
-
- for (swp = swdevt; swp->sw_dev != NODEV; swp++) {
- maj = major(swp->sw_dev);
- if (maj > nblkdev)
- break;
- if (bdevsw[maj].d_psize) {
- nblks = (*bdevsw[maj].d_psize)(swp->sw_dev);
- if (nblks != -1 &&
- (swp->sw_nblks == 0 || swp->sw_nblks > nblks))
- swp->sw_nblks = nblks;
- swp->sw_nblks = ctod(dtoc(swp->sw_nblks));
- }
- }
-}
-
-/*
* This is called by configure to set dumplo and dumpsize.
* Dumps always skip the first CLBYTES of disk space
* in case there might be a disk label stored there.
diff --git a/sys/arch/hppa64/hppa64/autoconf.c b/sys/arch/hppa64/hppa64/autoconf.c
index 9945c275d7b..ef93254bdab 100644
--- a/sys/arch/hppa64/hppa64/autoconf.c
+++ b/sys/arch/hppa64/hppa64/autoconf.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: autoconf.c,v 1.3 2005/05/25 20:49:26 mickey Exp $ */
+/* $OpenBSD: autoconf.c,v 1.4 2005/12/27 18:31:09 miod Exp $ */
/*
* Copyright (c) 1998-2005 Michael Shalayeff
@@ -67,7 +67,6 @@
#endif
void setroot(void);
-void swapconf(void);
void dumpconf(void);
int findblkmajor(struct device *dv);
@@ -118,7 +117,6 @@ cpu_configure(void)
spl0();
setroot();
- swapconf();
dumpconf();
if (cold_hook)
(*cold_hook)(HPPA_COLD_HOT);
@@ -177,29 +175,6 @@ heartbeat(v)
#endif
/*
- * Configure swap space and related parameters.
- */
-void
-swapconf(void)
-{
- struct swdevt *swp;
- int nblks, maj;
-
- for (swp = swdevt; swp->sw_dev != NODEV; swp++) {
- maj = major(swp->sw_dev);
- if (maj > nblkdev)
- break;
- if (bdevsw[maj].d_psize) {
- nblks = (*bdevsw[maj].d_psize)(swp->sw_dev);
- if (nblks != -1 &&
- (swp->sw_nblks == 0 || swp->sw_nblks > nblks))
- swp->sw_nblks = nblks;
- swp->sw_nblks = ctod(dtoc(swp->sw_nblks));
- }
- }
-}
-
-/*
* This is called by configure to set dumplo and dumpsize.
* Dumps always skip the first CLBYTES of disk space
* in case there might be a disk label stored there.
diff --git a/sys/arch/i386/i386/autoconf.c b/sys/arch/i386/i386/autoconf.c
index e575085af43..1348cd11361 100644
--- a/sys/arch/i386/i386/autoconf.c
+++ b/sys/arch/i386/i386/autoconf.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: autoconf.c,v 1.55 2005/01/01 02:57:36 millert Exp $ */
+/* $OpenBSD: autoconf.c,v 1.56 2005/12/27 18:31:09 miod Exp $ */
/* $NetBSD: autoconf.c,v 1.20 1996/05/03 19:41:56 christos Exp $ */
/*-
@@ -71,7 +71,6 @@ int findblkmajor(struct device *dv);
char *findblkname(int);
void rootconf(void);
-void swapconf(void);
void setroot(void);
void diskconf(void);
@@ -172,34 +171,9 @@ diskconf()
dkcsumattach();
rootconf();
- swapconf();
dumpconf();
}
-/*
- * Configure swap space and related parameters.
- */
-void
-swapconf()
-{
- register struct swdevt *swp;
- register int nblks;
-
- for (swp = swdevt; swp->sw_dev != NODEV; swp++) {
- int maj = major(swp->sw_dev);
-
- if (maj > nblkdev)
- break;
- if (bdevsw[maj].d_psize) {
- nblks = (*bdevsw[maj].d_psize)(swp->sw_dev);
- if (nblks != -1 &&
- (swp->sw_nblks == 0 || swp->sw_nblks > nblks))
- swp->sw_nblks = nblks;
- swp->sw_nblks = ctod(dtoc(swp->sw_nblks));
- }
- }
-}
-
#define DOSWAP /* change swdevt and dumpdev */
static struct {
diff --git a/sys/arch/luna88k/luna88k/autoconf.c b/sys/arch/luna88k/luna88k/autoconf.c
index 6996e149a5f..90474e34788 100644
--- a/sys/arch/luna88k/luna88k/autoconf.c
+++ b/sys/arch/luna88k/luna88k/autoconf.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: autoconf.c,v 1.5 2005/04/30 16:42:33 miod Exp $ */
+/* $OpenBSD: autoconf.c,v 1.6 2005/12/27 18:31:09 miod Exp $ */
/*
* Copyright (c) 1998 Steve Murphree, Jr.
* Copyright (c) 1996 Nivas Madhur
@@ -57,7 +57,6 @@
struct device *parsedisk(char *, int, int, dev_t *);
void setroot(void);
-void swapconf(void);
void dumpconf(void);
int findblkmajor(struct device *);
struct device *getdisk(char *, int, int, dev_t *);
@@ -87,33 +86,11 @@ cpu_configure()
set_psr(get_psr() & ~PSR_IND);
spl0();
setroot();
- swapconf();
+ dumpconf();
cold = 0;
}
-/*
- * Configure swap space and related parameters.
- */
-void
-swapconf()
-{
- struct swdevt *swp;
- int nblks;
-
- for (swp = swdevt; swp->sw_dev != NODEV; swp++)
- if (bdevsw[major(swp->sw_dev)].d_psize) {
- nblks =
- (*bdevsw[major(swp->sw_dev)].d_psize)(swp->sw_dev);
- if (nblks != -1 &&
- (swp->sw_nblks == 0 || swp->sw_nblks > nblks))
- swp->sw_nblks = nblks;
- swp->sw_nblks = ctod(dtoc(swp->sw_nblks));
- }
-
- dumpconf();
-}
-
struct nam2blk {
char *name;
int maj;
diff --git a/sys/arch/mac68k/mac68k/autoconf.c b/sys/arch/mac68k/mac68k/autoconf.c
index ef14b0f0859..cbbdea0e3ce 100644
--- a/sys/arch/mac68k/mac68k/autoconf.c
+++ b/sys/arch/mac68k/mac68k/autoconf.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: autoconf.c,v 1.21 2005/08/01 14:49:55 miod Exp $ */
+/* $OpenBSD: autoconf.c,v 1.22 2005/12/27 18:31:09 miod Exp $ */
/* $NetBSD: autoconf.c,v 1.38 1996/12/18 05:46:09 scottr Exp $ */
/*
@@ -83,7 +83,6 @@ void findbootdev(void);
int target_to_unit(u_long, u_long, u_long);
void setroot(void);
-void swapconf(void);
#ifdef RAMDISK_HOOKS
static struct device fakerdrootdev = { DV_DISK, {}, NULL, 0, "rd0", NULL };
@@ -101,32 +100,8 @@ cpu_configure()
findbootdev();
setroot();
- swapconf();
- cold = 0;
-}
-
-/*
- * Configure swap space and related parameters.
- */
-void
-swapconf()
-{
- struct swdevt *swp;
- int nblks, maj;
-
- for (swp = swdevt; swp->sw_dev != NODEV ; swp++) {
- maj = major(swp->sw_dev);
- if (maj > nblkdev)
- break;
- if (bdevsw[maj].d_psize) {
- nblks = (*bdevsw[maj].d_psize)(swp->sw_dev);
- if (nblks != -1 &&
- (swp->sw_nblks == 0 || swp->sw_nblks > nblks))
- swp->sw_nblks = nblks;
- swp->sw_nblks = ctod(dtoc(swp->sw_nblks));
- }
- }
dumpconf();
+ cold = 0;
}
struct nam2blk {
diff --git a/sys/arch/macppc/macppc/autoconf.c b/sys/arch/macppc/macppc/autoconf.c
index 6f5813779d6..f94b782232d 100644
--- a/sys/arch/macppc/macppc/autoconf.c
+++ b/sys/arch/macppc/macppc/autoconf.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: autoconf.c,v 1.21 2005/11/25 02:42:25 brad Exp $ */
+/* $OpenBSD: autoconf.c,v 1.22 2005/12/27 18:31:09 miod Exp $ */
/*
* Copyright (c) 1996, 1997 Per Fogelstrom
* Copyright (c) 1995 Theo de Raadt
@@ -37,7 +37,7 @@
* from: Utah Hdr: autoconf.c 1.31 91/01/21
*
* from: @(#)autoconf.c 8.1 (Berkeley) 6/10/93
- * $Id: autoconf.c,v 1.21 2005/11/25 02:42:25 brad Exp $
+ * $Id: autoconf.c,v 1.22 2005/12/27 18:31:09 miod Exp $
*/
/*
@@ -62,7 +62,6 @@
struct device *parsedisk(char *, int, int, dev_t *);
void setroot(void);
-void swapconf(void);
void dumpconf(void);
int findblkmajor(struct device *);
char *findblkname(int);
@@ -128,32 +127,10 @@ diskconf()
rootconf();
#endif
setroot();
- swapconf();
dumpconf();
}
/*
- * Configure swap space and related parameters.
- */
-void
-swapconf()
-{
- struct swdevt *swp;
- int nblks;
-
- for (swp = swdevt; swp->sw_dev != NODEV; swp++) {
- if (bdevsw[major(swp->sw_dev)].d_psize) {
- nblks =
- (*bdevsw[major(swp->sw_dev)].d_psize)(swp->sw_dev);
- if (nblks != -1 &&
- (swp->sw_nblks == 0 || swp->sw_nblks > nblks))
- swp->sw_nblks = nblks;
- swp->sw_nblks = ctod(dtoc(swp->sw_nblks));
- }
- }
-}
-
-/*
* Crash dump handling.
*/
diff --git a/sys/arch/mvme68k/mvme68k/autoconf.c b/sys/arch/mvme68k/mvme68k/autoconf.c
index 75d323be0c8..2e0a726eb5c 100644
--- a/sys/arch/mvme68k/mvme68k/autoconf.c
+++ b/sys/arch/mvme68k/mvme68k/autoconf.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: autoconf.c,v 1.31 2005/12/22 22:56:31 miod Exp $ */
+/* $OpenBSD: autoconf.c,v 1.32 2005/12/27 18:31:09 miod Exp $ */
/*
* Copyright (c) 1995 Theo de Raadt
@@ -87,7 +87,6 @@
#include <machine/pte.h>
void setroot(void);
-void swapconf(void);
int mainbus_print(void *, const char *);
int mainbus_scan(struct device *, void *, void *);
int findblkmajor(struct device *);
@@ -197,7 +196,7 @@ cpu_configure()
panic("autoconfig failed, no root");
setroot();
- swapconf();
+ dumpconf();
cold = 0;
}
@@ -253,26 +252,6 @@ unmapiodev(kva, size)
}
/*
- * Configure swap space and related parameters.
- */
-void
-swapconf()
-{
- register struct swdevt *swp;
- register int nblks;
-
- for (swp = swdevt; swp->sw_dev != NODEV; swp++)
- if (bdevsw[major(swp->sw_dev)].d_psize) {
- nblks =
- (*bdevsw[major(swp->sw_dev)].d_psize)(swp->sw_dev);
- if (nblks != -1 &&
- (swp->sw_nblks == 0 || swp->sw_nblks > nblks))
- swp->sw_nblks = nblks;
- }
- dumpconf();
-}
-
-/*
* the rest of this file was adapted from Theo de Raadt's code in the
* sparc port to nuke the "options GENERIC" stuff.
*/
diff --git a/sys/arch/mvme88k/mvme88k/autoconf.c b/sys/arch/mvme88k/mvme88k/autoconf.c
index c3b9bd1bed8..9cb459fcbcd 100644
--- a/sys/arch/mvme88k/mvme88k/autoconf.c
+++ b/sys/arch/mvme88k/mvme88k/autoconf.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: autoconf.c,v 1.31 2005/04/30 16:42:37 miod Exp $ */
+/* $OpenBSD: autoconf.c,v 1.32 2005/12/27 18:31:10 miod Exp $ */
/*
* Copyright (c) 1998 Steve Murphree, Jr.
* Copyright (c) 1996 Nivas Madhur
@@ -57,7 +57,6 @@
struct device *parsedisk(char *, int, int, dev_t *);
void setroot(void);
-void swapconf(void);
char buginchr(void);
void dumpconf(void);
int findblkmajor(struct device *);
@@ -88,7 +87,7 @@ cpu_configure()
set_psr(get_psr() & ~PSR_IND);
spl0();
setroot();
- swapconf();
+ dumpconf();
/*
* Finally switch to the real console driver,
@@ -100,27 +99,6 @@ cpu_configure()
cold = 0;
}
-/*
- * Configure swap space and related parameters.
- */
-void
-swapconf()
-{
- struct swdevt *swp;
- int nblks;
-
- for (swp = swdevt; swp->sw_dev != NODEV; swp++)
- if (bdevsw[major(swp->sw_dev)].d_psize) {
- nblks =
- (*bdevsw[major(swp->sw_dev)].d_psize)(swp->sw_dev);
- if (nblks != -1 &&
- (swp->sw_nblks == 0 || swp->sw_nblks > nblks))
- swp->sw_nblks = nblks;
- swp->sw_nblks = ctod(dtoc(swp->sw_nblks));
- }
- dumpconf();
-}
-
struct nam2blk {
char *name;
int maj;
diff --git a/sys/arch/mvmeppc/mvmeppc/autoconf.c b/sys/arch/mvmeppc/mvmeppc/autoconf.c
index 5af7911b9f1..9ecee0cc060 100644
--- a/sys/arch/mvmeppc/mvmeppc/autoconf.c
+++ b/sys/arch/mvmeppc/mvmeppc/autoconf.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: autoconf.c,v 1.13 2005/04/21 00:15:42 deraadt Exp $ */
+/* $OpenBSD: autoconf.c,v 1.14 2005/12/27 18:31:10 miod Exp $ */
/*
* Copyright (c) 1996, 1997 Per Fogelstrom
* Copyright (c) 1995 Theo de Raadt
@@ -37,7 +37,7 @@
* from: Utah Hdr: autoconf.c 1.31 91/01/21
*
* from: @(#)autoconf.c 8.1 (Berkeley) 6/10/93
- * $Id: autoconf.c,v 1.13 2005/04/21 00:15:42 deraadt Exp $
+ * $Id: autoconf.c,v 1.14 2005/12/27 18:31:10 miod Exp $
*/
/*
@@ -61,7 +61,6 @@
struct device *parsedisk(char *, int, int, dev_t *);
void setroot(void);
-void swapconf(void);
extern void dumpconf(void);
int findblkmajor(struct device *);
char *findblkname(int);
@@ -109,28 +108,6 @@ void
diskconf()
{
setroot();
- swapconf();
-}
-
-/*
- * Configure swap space and related parameters.
- */
-void
-swapconf()
-{
- struct swdevt *swp;
- int nblks;
-
- for (swp = swdevt; swp->sw_dev != NODEV; swp++) {
- if (bdevsw[major(swp->sw_dev)].d_psize) {
- nblks =
- (*bdevsw[major(swp->sw_dev)].d_psize)(swp->sw_dev);
- if (nblks != -1 &&
- (swp->sw_nblks == 0 || swp->sw_nblks > nblks))
- swp->sw_nblks = nblks;
- swp->sw_nblks = ctod(dtoc(swp->sw_nblks));
- }
- }
#if 0
dumpconf();
#endif
diff --git a/sys/arch/sgi/sgi/autoconf.c b/sys/arch/sgi/sgi/autoconf.c
index 99568a2d8fb..09cdd9c32d5 100644
--- a/sys/arch/sgi/sgi/autoconf.c
+++ b/sys/arch/sgi/sgi/autoconf.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: autoconf.c,v 1.10 2005/12/19 21:37:10 miod Exp $ */
+/* $OpenBSD: autoconf.c,v 1.11 2005/12/27 18:31:10 miod Exp $ */
/*
* Copyright (c) 1996 Per Fogelstrom
* Copyright (c) 1995 Theo de Raadt
@@ -61,7 +61,6 @@
struct device *parsedisk(char *, int, int, dev_t *);
void disk_configure(void);
void rootconf(void);
-void swapconf(void);
extern void dumpconf(void);
int findblkmajor(struct device *);
struct device * getdisk(char *, int, int, dev_t *);
@@ -112,31 +111,10 @@ void
disk_configure()
{
rootconf();
- swapconf();
dumpconf();
}
/*
- * Configure swap space and related parameters.
- */
-void
-swapconf()
-{
- struct swdevt *swp;
- int nblks;
-
- for (swp = swdevt; swp->sw_dev != NODEV; swp++) {
- if (bdevsw[major(swp->sw_dev)].d_psize) {
- nblks = (*bdevsw[major(swp->sw_dev)].d_psize)(swp->sw_dev);
- if (nblks != -1 && (swp->sw_nblks == 0 || swp->sw_nblks > nblks)) {
- swp->sw_nblks = nblks;
- }
- swp->sw_nblks = ctod(dtoc(swp->sw_nblks));
- }
- }
-}
-
-/*
* the rest of this file was influenced/copied from Theo de Raadt's
* code in the sparc port to nuke the "options GENERIC" stuff.
*/
diff --git a/sys/arch/solbourne/solbourne/autoconf.c b/sys/arch/solbourne/solbourne/autoconf.c
index d002cd939f0..e118435908c 100644
--- a/sys/arch/solbourne/solbourne/autoconf.c
+++ b/sys/arch/solbourne/solbourne/autoconf.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: autoconf.c,v 1.2 2005/04/21 00:15:43 deraadt Exp $ */
+/* $OpenBSD: autoconf.c,v 1.3 2005/12/27 18:31:10 miod Exp $ */
/* OpenBSD: autoconf.c,v 1.64 2005/03/23 17:10:24 miod Exp */
/*
@@ -100,7 +100,6 @@ int findblkmajor(struct device *);
char *findblkname(int);
static struct device *getdisk(char *, int, int, dev_t *);
static int mbprint(void *, const char *);
-void swapconf(void);
void sync_crash(void);
int mainbus_match(struct device *, void *, void *);
static void mainbus_attach(struct device *, struct device *, void *);
@@ -319,7 +318,7 @@ cpu_configure()
* parameter based on device(s) used.
*/
setroot();
- swapconf();
+ dumpconf();
cold = 0;
/*
@@ -564,27 +563,6 @@ callrom()
#endif
}
-/*
- * Configure swap space and related parameters.
- */
-void
-swapconf()
-{
- struct swdevt *swp;
- int nblks;
-
- for (swp = swdevt; swp->sw_dev != NODEV; swp++)
- if (bdevsw[major(swp->sw_dev)].d_psize) {
- nblks =
- (*bdevsw[major(swp->sw_dev)].d_psize)(swp->sw_dev);
- if (nblks != -1 &&
- (swp->sw_nblks == 0 || swp->sw_nblks > nblks))
- swp->sw_nblks = nblks;
- swp->sw_nblks = ctod(dtoc(swp->sw_nblks));
- }
- dumpconf();
-}
-
struct nam2blk {
char *name;
int maj;
diff --git a/sys/arch/sparc/sparc/autoconf.c b/sys/arch/sparc/sparc/autoconf.c
index 3baf15d283d..2df1eb97dea 100644
--- a/sys/arch/sparc/sparc/autoconf.c
+++ b/sys/arch/sparc/sparc/autoconf.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: autoconf.c,v 1.69 2005/09/25 20:05:37 miod Exp $ */
+/* $OpenBSD: autoconf.c,v 1.70 2005/12/27 18:31:10 miod Exp $ */
/* $NetBSD: autoconf.c,v 1.73 1997/07/29 09:41:53 fair Exp $ */
/*
@@ -107,7 +107,6 @@ char *findblkname(int);
static struct device *getdisk(char *, int, int, dev_t *);
static int mbprint(void *, const char *);
static void crazymap(char *, int *);
-void swapconf(void);
void sync_crash(void);
int mainbus_match(struct device *, void *, void *);
static void mainbus_attach(struct device *, struct device *, void *);
@@ -851,7 +850,7 @@ cpu_configure()
* parameter based on device(s) used.
*/
setroot();
- swapconf();
+ dumpconf();
cold = 0;
/*
@@ -1738,27 +1737,6 @@ callrom()
promvec->pv_abort();
}
-/*
- * Configure swap space and related parameters.
- */
-void
-swapconf()
-{
- register struct swdevt *swp;
- register int nblks;
-
- for (swp = swdevt; swp->sw_dev != NODEV; swp++)
- if (bdevsw[major(swp->sw_dev)].d_psize) {
- nblks =
- (*bdevsw[major(swp->sw_dev)].d_psize)(swp->sw_dev);
- if (nblks != -1 &&
- (swp->sw_nblks == 0 || swp->sw_nblks > nblks))
- swp->sw_nblks = nblks;
- swp->sw_nblks = ctod(dtoc(swp->sw_nblks));
- }
- dumpconf();
-}
-
#if 0 /* Unused */
dev_t bootdev;
#endif
diff --git a/sys/arch/sparc64/sparc64/autoconf.c b/sys/arch/sparc64/sparc64/autoconf.c
index 1dbfecb07f4..9cbd93cfa46 100644
--- a/sys/arch/sparc64/sparc64/autoconf.c
+++ b/sys/arch/sparc64/sparc64/autoconf.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: autoconf.c,v 1.42 2005/10/06 19:53:40 brad Exp $ */
+/* $OpenBSD: autoconf.c,v 1.43 2005/12/27 18:31:11 miod Exp $ */
/* $NetBSD: autoconf.c,v 1.51 2001/07/24 19:32:11 eeh Exp $ */
/*
@@ -111,7 +111,6 @@ int mainbus_match(struct device *, void *, void *);
static void mainbus_attach(struct device *, struct device *, void *);
static int getstr(char *, int);
void setroot(void);
-void swapconf(void);
void diskconf(void);
static struct device *getdisk(char *, int, int, dev_t *);
int findblkmajor(struct device *);
@@ -503,28 +502,10 @@ void
diskconf(void)
{
setroot();
- swapconf();
dumpconf();
}
void
-swapconf()
-{
- struct swdevt *swp;
- int nblks;
-
- for (swp = swdevt; swp->sw_dev != NODEV; swp++)
- if (bdevsw[major(swp->sw_dev)].d_psize) {
- nblks =
- (*bdevsw[major(swp->sw_dev)].d_psize)(swp->sw_dev);
- if (nblks != -1 &&
- (swp->sw_nblks == 0 || swp->sw_nblks > nblks))
- swp->sw_nblks = nblks;
- swp->sw_nblks = ctod(dtoc(swp->sw_nblks));
- }
-}
-
-void
setroot()
{
struct swdevt *swp;
diff --git a/sys/arch/vax/vax/autoconf.c b/sys/arch/vax/vax/autoconf.c
index f48d226c7d9..3b92f89460a 100644
--- a/sys/arch/vax/vax/autoconf.c
+++ b/sys/arch/vax/vax/autoconf.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: autoconf.c,v 1.19 2002/09/17 02:37:20 hugh Exp $ */
+/* $OpenBSD: autoconf.c,v 1.20 2005/12/27 18:31:11 miod Exp $ */
/* $NetBSD: autoconf.c,v 1.45 1999/10/23 14:56:05 ragge Exp $ */
/*
@@ -78,11 +78,6 @@ cpu_configure()
panic("mainbus not configured");
setroot();
- /*
- * Configure swap area and related system
- * parameter based on device(s) used.
- */
- swapconf();
cpu_dumpconf();
/*
diff --git a/sys/arch/vax/vax/rootfil.c b/sys/arch/vax/vax/rootfil.c
index 237d27346af..59d6afcf247 100644
--- a/sys/arch/vax/vax/rootfil.c
+++ b/sys/arch/vax/vax/rootfil.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: rootfil.c,v 1.17 2004/12/25 23:02:26 miod Exp $ */
+/* $OpenBSD: rootfil.c,v 1.18 2005/12/27 18:31:11 miod Exp $ */
/* $NetBSD: rootfil.c,v 1.14 1996/10/13 03:35:58 christos Exp $ */
/*
@@ -408,29 +408,3 @@ getstr(char *buf, int size) {
cnpollc(0);
return (len);
}
-
-/*
- * Configure swap space and related parameters.
- */
-void
-swapconf()
-{
- struct swdevt *swp;
- u_int maj;
- int nblks;
-
- for (swp = swdevt; swp->sw_dev != NODEV; swp++) {
-
- maj = major(swp->sw_dev);
- if (maj > nblkdev) /* paranoid? */
- break;
-
- if (bdevsw[maj].d_psize) {
- nblks = (*bdevsw[maj].d_psize)(swp->sw_dev);
- if (nblks > 0 &&
- (swp->sw_nblks == 0 || swp->sw_nblks > nblks))
- swp->sw_nblks = nblks;
- swp->sw_nblks = ctod(dtoc(swp->sw_nblks));
- }
- }
-}
diff --git a/sys/arch/zaurus/zaurus/autoconf.c b/sys/arch/zaurus/zaurus/autoconf.c
index c38b72a5ee8..690d66f95f4 100644
--- a/sys/arch/zaurus/zaurus/autoconf.c
+++ b/sys/arch/zaurus/zaurus/autoconf.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: autoconf.c,v 1.4 2005/11/25 02:42:25 brad Exp $ */
+/* $OpenBSD: autoconf.c,v 1.5 2005/12/27 18:31:11 miod Exp $ */
/* $NetBSD: autoconf.c,v 1.2 2001/09/05 16:17:36 matt Exp $ */
/*
@@ -63,7 +63,6 @@ struct device *bootdv = NULL;
int findblkmajor(struct device *dv);
char * findblkname(int maj);
-void swapconf(void);
void rootconf(void);
void diskconf(void);
@@ -222,38 +221,10 @@ diskconf()
#endif
rootconf();
#if 0
- swapconf();
dumpconf();
#endif
}
-/*
- * Configure swap space and related parameters.
- */
-void
-swapconf()
-{
- register struct swdevt *swp;
- register int nblks;
-
- for (swp = swdevt; swp->sw_dev != NODEV; swp++) {
- int maj = major(swp->sw_dev);
-
- if (maj > nblkdev)
- break;
- if (bdevsw[maj].d_psize) {
- nblks = (*bdevsw[maj].d_psize)(swp->sw_dev);
- if (nblks != -1 &&
- (swp->sw_nblks == 0 || swp->sw_nblks > nblks))
- swp->sw_nblks = nblks;
- swp->sw_nblks = ctod(dtoc(swp->sw_nblks));
- }
- }
-}
-
-void rootconf(void);
-void diskconf(void);
-
/*
* void cpu_configure()
diff --git a/sys/conf/swapgeneric.c b/sys/conf/swapgeneric.c
index a5d423f6383..6c425578dd0 100644
--- a/sys/conf/swapgeneric.c
+++ b/sys/conf/swapgeneric.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: swapgeneric.c,v 1.2 2003/06/02 23:28:01 millert Exp $ */
+/* $OpenBSD: swapgeneric.c,v 1.3 2005/12/27 18:31:11 miod Exp $ */
/* $NetBSD: swapgeneric.c,v 1.12 1996/05/03 19:42:28 christos Exp $ */
/*-
@@ -48,6 +48,6 @@ dev_t rootdev = NODEV;
dev_t dumpdev = NODEV;
struct swdevt swdevt[] = {
- { NODEV, 0, 0 }, /* to be filled in */
- { NODEV, 0, 0 }
+ { NODEV, 0, NULL }, /* to be filled in */
+ { NODEV, 0, NULL }
};
diff --git a/sys/nfs/nfs_vfsops.c b/sys/nfs/nfs_vfsops.c
index 0240b4a73ae..22f1d295f5d 100644
--- a/sys/nfs/nfs_vfsops.c
+++ b/sys/nfs/nfs_vfsops.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: nfs_vfsops.c,v 1.58 2005/11/30 10:35:08 pedro Exp $ */
+/* $OpenBSD: nfs_vfsops.c,v 1.59 2005/12/27 18:31:12 miod Exp $ */
/* $NetBSD: nfs_vfsops.c,v 1.46.4.1 1996/05/25 22:40:35 fvdl Exp $ */
/*
@@ -357,14 +357,12 @@ nfs_mountroot()
#ifdef DEBUG
printf("swap size: 0x%lx (blocks)\n", n);
#endif
- swdevt[0].sw_nblks = n;
return (0);
}
printf("WARNING: no swap\n");
swdevt[0].sw_dev = NODEV;
swdevt[0].sw_vp = NULL;
- swdevt[0].sw_nblks = 0;
return (0);
}
diff --git a/sys/nfs/swapnfs.c b/sys/nfs/swapnfs.c
deleted file mode 100644
index b97f310efde..00000000000
--- a/sys/nfs/swapnfs.c
+++ /dev/null
@@ -1,55 +0,0 @@
-/* $OpenBSD: swapnfs.c,v 1.5 2003/06/02 23:28:20 millert Exp $ */
-/* $NetBSD: swapnfs.c,v 1.9 1995/04/30 07:03:13 cgd Exp $ */
-
-/*
- * Copyright (c) 1991 The Regents of the University of California.
- * All rights reserved.
- *
- * This code is derived from software contributed to Berkeley by
- * Rick Macklem at The University of Guelph.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * @(#)nfsswapvmunix.c 7.1 (Berkeley) 3/4/91
- */
-
-/*
- * NFS parameters are now filled in nfs_mountroot() by
- * nfs_boot().
- */
-
-#include <sys/param.h>
-#include <sys/conf.h>
-#include <sys/systm.h>
-
-dev_t rootdev = NODEV;
-dev_t dumpdev = NODEV;
-
-struct swdevt swdevt[] = {
- { NODEV, 0, 0 },
- { NODEV, 0, 0 }
-};
-
-int (*mountroot)(void) = nfs_mountroot;
diff --git a/sys/sys/conf.h b/sys/sys/conf.h
index 156d8bd5dc5..287535f40ed 100644
--- a/sys/sys/conf.h
+++ b/sys/sys/conf.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: conf.h,v 1.76 2005/07/31 06:39:07 dlg Exp $ */
+/* $OpenBSD: conf.h,v 1.77 2005/12/27 18:31:12 miod Exp $ */
/* $NetBSD: conf.h,v 1.33 1996/05/03 20:03:32 christos Exp $ */
/*-
@@ -506,7 +506,6 @@ extern struct linesw linesw[];
struct swdevt {
dev_t sw_dev;
int sw_flags;
- int sw_nblks;
struct vnode *sw_vp;
};
#define SW_FREED 0x01