summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sys/arch/alpha/alpha/rd_root.c79
-rw-r--r--sys/arch/alpha/conf/files.alpha4
-rw-r--r--sys/arch/amiga/conf/files.amiga4
-rw-r--r--sys/arch/amiga/dev/rd_root.c76
-rw-r--r--sys/arch/hp300/conf/files.hp3004
-rw-r--r--sys/arch/hp300/dev/rd_root.c77
-rw-r--r--sys/arch/hppa/conf/files.hppa4
-rw-r--r--sys/arch/hppa/dev/rd_root.c86
-rw-r--r--sys/arch/i386/conf/files.i3864
-rw-r--r--sys/arch/i386/i386/rd_root.c76
-rw-r--r--sys/arch/mac68k/conf/files.mac68k4
-rw-r--r--sys/arch/mac68k/dev/rd_root.c77
-rw-r--r--sys/arch/mvme68k/conf/files.mvme68k4
-rw-r--r--sys/arch/mvme68k/dev/rd_root.c75
-rw-r--r--sys/arch/mvme88k/conf/files.mvme88k4
-rw-r--r--sys/arch/mvme88k/dev/rd_root.c80
-rw-r--r--sys/arch/pmax/conf/files.pmax4
-rw-r--r--sys/arch/pmax/pmax/rd_root.c77
-rw-r--r--sys/arch/powerpc/conf/files.powerpc2
-rw-r--r--sys/arch/powerpc/powerpc/rd_root.c75
-rw-r--r--sys/arch/sparc/conf/files.sparc4
-rw-r--r--sys/arch/sparc/sparc/rd_root.c77
-rw-r--r--sys/arch/sun3/conf/files.sun34
-rw-r--r--sys/arch/sun3/dev/rd_root.c86
-rw-r--r--sys/arch/vax/conf/files.vax4
-rw-r--r--sys/arch/vax/vax/rd_root.c77
26 files changed, 25 insertions, 1043 deletions
diff --git a/sys/arch/alpha/alpha/rd_root.c b/sys/arch/alpha/alpha/rd_root.c
deleted file mode 100644
index 3c7d437050e..00000000000
--- a/sys/arch/alpha/alpha/rd_root.c
+++ /dev/null
@@ -1,79 +0,0 @@
-/* $OpenBSD: rd_root.c,v 1.2 1998/07/19 16:08:02 deraadt Exp $ */
-/* $NetBSD: rd_root.c,v 1.5 1996/10/13 02:59:47 christos Exp $ */
-
-/*
- * Copyright (c) 1996 Christopher G. Demetriou. All rights reserved.
- * Copyright (c) 1995 Gordon W. Ross
- * All rights reserved.
- *
- * 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. The name of the author may not be used to endorse or promote products
- * derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``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 AUTHOR 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.
- */
-
-#include <sys/param.h>
-#include <sys/systm.h>
-#include <sys/reboot.h>
-
-#include <dev/ramdisk.h>
-
-extern int boothowto;
-
-#ifndef MINIROOTSIZE
-#define MINIROOTSIZE 512
-#endif
-
-#define ROOTBYTES (MINIROOTSIZE << DEV_BSHIFT)
-
-/*
- * This array will be patched to contain a file-system image.
- */
-u_int32_t rd_root_size = ROOTBYTES;
-char rd_root_image[ROOTBYTES] = "|This is the root ramdisk!\n";
-
-/*
- * This is called during autoconfig.
- */
-void
-rd_attach_hook(unit, rd)
- int unit;
- struct rd_conf *rd;
-{
-
- if (unit == 0) {
- /* Setup root ramdisk */
- rd->rd_addr = (caddr_t)rd_root_image;
- rd->rd_size = (size_t)rd_root_size;
- rd->rd_type = RD_KMEM_FIXED;
- printf("rd%d: internal %dK image area\n", unit,
- ROOTBYTES / 1024);
- }
-}
-
-/*
- * This is called during open (i.e. mountroot)
- */
-void
-rd_open_hook(unit, rd)
- int unit;
- struct rd_conf *rd;
-{
-}
diff --git a/sys/arch/alpha/conf/files.alpha b/sys/arch/alpha/conf/files.alpha
index 0309853c0c3..bf47398f3d2 100644
--- a/sys/arch/alpha/conf/files.alpha
+++ b/sys/arch/alpha/conf/files.alpha
@@ -1,4 +1,4 @@
-# $OpenBSD: files.alpha,v 1.47 2001/04/14 17:51:41 art Exp $
+# $OpenBSD: files.alpha,v 1.48 2001/05/11 06:41:36 deraadt Exp $
# $NetBSD: files.alpha,v 1.32 1996/11/25 04:03:21 cgd Exp $
#
# alpha-specific configuration info
@@ -45,7 +45,7 @@ major { cd = 3 }
major { sd = 8 }
# RAM Disk
-file arch/alpha/alpha/rd_root.c ramdisk_hooks
+file dev/rd.c ramdisk_hooks
major { rd = 6 }
# Raster operations
diff --git a/sys/arch/amiga/conf/files.amiga b/sys/arch/amiga/conf/files.amiga
index 7984722bca0..72fd03b754c 100644
--- a/sys/arch/amiga/conf/files.amiga
+++ b/sys/arch/amiga/conf/files.amiga
@@ -1,4 +1,4 @@
-# $OpenBSD: files.amiga,v 1.39 2000/10/12 19:36:52 espie Exp $
+# $OpenBSD: files.amiga,v 1.40 2001/05/11 06:41:37 deraadt Exp $
# $NetBSD: files.amiga,v 1.62 1997/08/27 19:32:47 is Exp $
@@ -97,7 +97,7 @@ file arch/amiga/dev/grf_cc.c grfcc needs-flag
file arch/amiga/dev/ite_cc.c grfcc & ite
# RAM disk
-file arch/amiga/dev/rd_root.c ramdisk_hooks
+file dev/rd.c ramdisk_hooks
pseudo-device view
file arch/amiga/dev/view.c view | grfcc needs-count
diff --git a/sys/arch/amiga/dev/rd_root.c b/sys/arch/amiga/dev/rd_root.c
deleted file mode 100644
index a7954df58b8..00000000000
--- a/sys/arch/amiga/dev/rd_root.c
+++ /dev/null
@@ -1,76 +0,0 @@
-/* $OpenBSD: rd_root.c,v 1.3 1998/07/19 16:08:04 deraadt Exp $ */
-
-/*
- * Copyright (c) 1995 Gordon W. Ross
- * All rights reserved.
- *
- * 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. The name of the author may not be used to endorse or promote products
- * derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``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 AUTHOR 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.
- */
-
-#include <sys/param.h>
-#include <sys/reboot.h>
-#include <sys/systm.h>
-
-#include <dev/ramdisk.h>
-
-extern int boothowto;
-
-#ifndef MINIROOTSIZE
-#define MINIROOTSIZE 512
-#endif
-
-#define ROOTBYTES (MINIROOTSIZE << DEV_BSHIFT)
-
-/*
- * This array will be patched to contain a file-system image.
- * See the program: src/distrib/common/rdsetroot.c
- */
-int rd_root_size = ROOTBYTES;
-char rd_root_image[ROOTBYTES] = "|This is the root ramdisk!\n";
-
-/*
- * This is called during autoconfig.
- */
-void
-rd_attach_hook(unit, rd)
- int unit;
- struct rd_conf *rd;
-{
- if (unit == 0) {
- /* Setup root ramdisk */
- rd->rd_addr = (caddr_t) rd_root_image;
- rd->rd_size = (size_t) rd_root_size;
- rd->rd_type = RD_KMEM_FIXED;
- printf("rd%d: fixed, %d blocks\n", unit, MINIROOTSIZE);
- }
-}
-
-/*
- * This is called during open (i.e. mountroot)
- */
-void
-rd_open_hook(unit, rd)
- int unit;
- struct rd_conf *rd;
-{
-}
diff --git a/sys/arch/hp300/conf/files.hp300 b/sys/arch/hp300/conf/files.hp300
index 700b92d26e2..530b5509dcf 100644
--- a/sys/arch/hp300/conf/files.hp300
+++ b/sys/arch/hp300/conf/files.hp300
@@ -1,4 +1,4 @@
-# $OpenBSD: files.hp300,v 1.12 1999/11/08 15:36:08 mickey Exp $
+# $OpenBSD: files.hp300,v 1.13 2001/05/11 06:41:39 deraadt Exp $
# $NetBSD: files.hp300,v 1.28 1997/05/12 08:23:28 thorpej Exp $
#
# hp300-specific configuration info
@@ -165,7 +165,7 @@ attach ppi at hpibbus
file arch/hp300/dev/ppi.c ppi needs-flag
# RAM disk
-file arch/hp300/dev/rd_root.c ramdisk_hooks
+file dev/rd.c ramdisk_hooks
major {rd = 8}
# Old HP SCSI layer
diff --git a/sys/arch/hp300/dev/rd_root.c b/sys/arch/hp300/dev/rd_root.c
deleted file mode 100644
index f8218c1f691..00000000000
--- a/sys/arch/hp300/dev/rd_root.c
+++ /dev/null
@@ -1,77 +0,0 @@
-/* $OpenBSD: rd_root.c,v 1.4 1998/07/19 16:08:07 deraadt Exp $ */
-/* $NetBSD: rd_root.c,v 1.1 1996/05/20 01:17:31 chuck Exp $ */
-
-/*
- * Copyright (c) 1995 Gordon W. Ross
- * All rights reserved.
- *
- * 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. The name of the author may not be used to endorse or promote products
- * derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``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 AUTHOR 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.
- */
-
-#include <sys/param.h>
-#include <sys/reboot.h>
-#include <sys/systm.h>
-
-#include <dev/ramdisk.h>
-
-extern int boothowto;
-
-#ifndef MINIROOTSIZE
-#define MINIROOTSIZE 512
-#endif
-
-#define ROOTBYTES (MINIROOTSIZE << DEV_BSHIFT)
-
-/*
- * This array will be patched to contain a file-system image.
- * See the program: src/distrib/sun3/common/rdsetroot.c
- */
-int rd_root_size = ROOTBYTES;
-char rd_root_image[ROOTBYTES] = "|This is the root ramdisk!\n";
-
-/*
- * This is called during autoconfig.
- */
-void
-rd_attach_hook(unit, rd)
- int unit;
- struct rd_conf *rd;
-{
- if (unit == 0) {
- /* Setup root ramdisk */
- rd->rd_addr = (caddr_t) rd_root_image;
- rd->rd_size = (size_t) rd_root_size;
- rd->rd_type = RD_KMEM_FIXED;
- printf("rd%d: fixed, %d blocks\n", unit, MINIROOTSIZE);
- }
-}
-
-/*
- * This is called during open (i.e. mountroot)
- */
-void
-rd_open_hook(unit, rd)
- int unit;
- struct rd_conf *rd;
-{
-}
diff --git a/sys/arch/hppa/conf/files.hppa b/sys/arch/hppa/conf/files.hppa
index 12f31c20b53..f90b7cf24f1 100644
--- a/sys/arch/hppa/conf/files.hppa
+++ b/sys/arch/hppa/conf/files.hppa
@@ -1,4 +1,4 @@
-# $OpenBSD: files.hppa,v 1.28 2001/04/03 06:24:50 mickey Exp $
+# $OpenBSD: files.hppa,v 1.29 2001/05/11 06:41:41 deraadt Exp $
#
# hppa-specific configuration info
@@ -111,7 +111,7 @@ major {ccd = 1}
major {vnd = 2}
# RAM disk
-file arch/hppa/dev/rd_root.c ramdisk_hooks
+file dev/rd.c ramdisk_hooks
major {rd = 3}
#
diff --git a/sys/arch/hppa/dev/rd_root.c b/sys/arch/hppa/dev/rd_root.c
deleted file mode 100644
index 1eedba849ea..00000000000
--- a/sys/arch/hppa/dev/rd_root.c
+++ /dev/null
@@ -1,86 +0,0 @@
-/* $OpenBSD: rd_root.c,v 1.2 1999/04/20 20:23:24 mickey Exp $ */
-
-/*
- * Copyright (c) 1996 Christopher G. Demetriou. All rights reserved.
- * Copyright (c) 1995 Gordon W. Ross
- * All rights reserved.
- *
- * 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. The name of the author may not be used to endorse or promote products
- * derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``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 AUTHOR 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.
- */
-
-#include <sys/param.h>
-#include <sys/systm.h>
-#include <sys/reboot.h>
-
-#include <dev/ramdisk.h>
-
-extern int boothowto;
-extern u_int32_t rd_root_size;
-extern char rd_root_image[];
-
-#ifndef MINIROOTSIZE
-#define MINIROOTSIZE 512
-#endif
-
-#define ROOTBYTES (MINIROOTSIZE << DEV_BSHIFT)
-
-/*
- * This is called during autoconfig.
- */
-void
-rd_attach_hook(unit, rd)
- int unit;
- struct rd_conf *rd;
-{
- if (unit == 0) {
- /* Setup root ramdisk */
- rd->rd_addr = rd_root_image;
- rd->rd_size = rd_root_size;
- rd->rd_type = RD_KMEM_FIXED;
- printf("rd%d: internal %dK image area\n", unit,
- rd_root_size / 1024);
- }
-}
-
-/*
- * This is called during open (i.e. mountroot)
- */
-void
-rd_open_hook(unit, rd)
- int unit;
- struct rd_conf *rd;
-{
-
- if (unit == 0) {
- /* The root ramdisk only works single-user. */
- boothowto |= RB_SINGLE;
- }
-}
-
-/*
- * This array will be patched to contain a file-system image.
- * XXX there is an overflow bug in gnu ld-hppa, so keep this down
- * the of .data segment (see ld.script) to avoid. will fix this later
- */
-u_int32_t rd_root_size = ROOTBYTES;
-char rd_root_image[ROOTBYTES] = "|This is the root ramdisk!\n";
diff --git a/sys/arch/i386/conf/files.i386 b/sys/arch/i386/conf/files.i386
index 7fc10d44aea..9a4ce881376 100644
--- a/sys/arch/i386/conf/files.i386
+++ b/sys/arch/i386/conf/files.i386
@@ -1,4 +1,4 @@
-# $OpenBSD: files.i386,v 1.83 2001/05/01 17:39:01 aaron Exp $
+# $OpenBSD: files.i386,v 1.84 2001/05/11 06:41:35 deraadt Exp $
# $NetBSD: files.i386,v 1.73 1996/05/07 00:58:36 thorpej Exp $
#
# new style config file for i386 architecture
@@ -60,7 +60,7 @@ major {st = 5}
major {cd = 6}
# RAM Disk for install floppy
-file arch/i386/i386/rd_root.c ramdisk_hooks
+file dev/rd.c ramdisk_hooks
major {rd = 17}
#
diff --git a/sys/arch/i386/i386/rd_root.c b/sys/arch/i386/i386/rd_root.c
deleted file mode 100644
index d687a0183a9..00000000000
--- a/sys/arch/i386/i386/rd_root.c
+++ /dev/null
@@ -1,76 +0,0 @@
-/* $NetBSD: rd_root.c,v 1.2 1996/03/27 16:38:33 perry Exp $ */
-
-/*
- * Copyright (c) 1995 Gordon W. Ross
- * All rights reserved.
- *
- * 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. The name of the author may not be used to endorse or promote products
- * derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``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 AUTHOR 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.
- */
-
-#include <sys/param.h>
-#include <sys/systm.h>
-#include <sys/reboot.h>
-
-#include <dev/ramdisk.h>
-
-extern int boothowto;
-
-#ifndef MINIROOTSIZE
-#define MINIROOTSIZE 512
-#endif
-
-#define ROOTBYTES (MINIROOTSIZE << DEV_BSHIFT)
-
-/*
- * This array will be patched to contain a file-system image.
- * See the program: src/distrib/sun3/common/rdsetroot.c
- */
-int rd_root_size = ROOTBYTES;
-char rd_root_image[ROOTBYTES] = "|This is the root ramdisk!\n";
-
-/*
- * This is called during autoconfig.
- */
-void
-rd_attach_hook(unit, rd)
- int unit;
- struct rd_conf *rd;
-{
- if (unit == 0) {
- /* Setup root ramdisk */
- rd->rd_addr = (caddr_t) rd_root_image;
- rd->rd_size = (size_t) rd_root_size;
- rd->rd_type = RD_KMEM_FIXED;
- printf("rd%d: fixed, %d blocks\n", unit, MINIROOTSIZE);
- }
-}
-
-/*
- * This is called during open (i.e. mountroot)
- */
-void
-rd_open_hook(unit, rd)
- int unit;
- struct rd_conf *rd;
-{
-}
diff --git a/sys/arch/mac68k/conf/files.mac68k b/sys/arch/mac68k/conf/files.mac68k
index 509ed64cb70..c3f508dcd73 100644
--- a/sys/arch/mac68k/conf/files.mac68k
+++ b/sys/arch/mac68k/conf/files.mac68k
@@ -1,4 +1,4 @@
-# $OpenBSD: files.mac68k,v 1.21 2000/06/12 06:10:47 fgsch Exp $
+# $OpenBSD: files.mac68k,v 1.22 2001/05/11 06:41:42 deraadt Exp $
# $NetBSD: files.mac68k,v 1.61 1997/03/01 20:22:16 scottr Exp $
# mac68k-specific configuration info
@@ -128,7 +128,7 @@ file dev/cons.c
file dev/cninit.c
# RAM Disk for boot tape
-file arch/sun3/dev/rd_root.c ramdisk_hooks
+file dev/rd.c ramdisk_hooks
major {sd = 4}
major {st = 5}
diff --git a/sys/arch/mac68k/dev/rd_root.c b/sys/arch/mac68k/dev/rd_root.c
deleted file mode 100644
index 6a7a3b43caa..00000000000
--- a/sys/arch/mac68k/dev/rd_root.c
+++ /dev/null
@@ -1,77 +0,0 @@
-/* $OpenBSD: rd_root.c,v 1.5 1999/06/13 06:29:08 downsj Exp $ */
-/* $NetBSD: rd_root.c,v 1.1 1996/05/20 01:17:31 chuck Exp $ */
-
-/*
- * Copyright (c) 1995 Gordon W. Ross
- * All rights reserved.
- *
- * 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. The name of the author may not be used to endorse or promote products
- * derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``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 AUTHOR 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.
- */
-
-#include <sys/param.h>
-#include <sys/reboot.h>
-#include <sys/systm.h>
-
-#include <dev/ramdisk.h>
-
-extern int boothowto;
-
-#ifndef MINIROOTSIZE
-#define MINIROOTSIZE 512
-#endif
-
-#define ROOTBYTES (MINIROOTSIZE << DEV_BSHIFT)
-
-/*
- * This array will be patched to contain a file-system image.
- * See the program: src/distrib/sun3/common/rdsetroot.c
- */
-int rd_root_size = ROOTBYTES;
-char rd_root_image[ROOTBYTES] = "|This is the root ramdisk!\n";
-
-/*
- * This is called during autoconfig.
- */
-void
-rd_attach_hook(unit, rd)
- int unit;
- struct rd_conf *rd;
-{
- if (unit == 0) {
- /* Setup root ramdisk */
- rd->rd_addr = (caddr_t) rd_root_image;
- rd->rd_size = (size_t) rd_root_size;
- rd->rd_type = RD_KMEM_FIXED;
- printf("rd%d: fixed, %d blocks\n", unit, MINIROOTSIZE);
- }
-}
-
-/*
- * This is called during open (i.e. mountroot)
- */
-void
-rd_open_hook(unit, rd)
- int unit;
- struct rd_conf *rd;
-{
-}
diff --git a/sys/arch/mvme68k/conf/files.mvme68k b/sys/arch/mvme68k/conf/files.mvme68k
index 8916514b93b..4ec53686e30 100644
--- a/sys/arch/mvme68k/conf/files.mvme68k
+++ b/sys/arch/mvme68k/conf/files.mvme68k
@@ -1,4 +1,4 @@
-# $OpenBSD: files.mvme68k,v 1.16 2001/02/18 17:41:02 deraadt Exp $
+# $OpenBSD: files.mvme68k,v 1.17 2001/05/11 06:41:43 deraadt Exp $
# config file for mvme68k
@@ -98,7 +98,7 @@ attach lptwo at pcctwo
file arch/mvme68k/dev/lptwo.c lptwo needs-count
# RAM disk for boot tape
-file arch/mvme68k/dev/rd_root.c ramdisk_hooks
+file dev/rd.c ramdisk_hooks
device xdc {target = -1}
attach xdc at vmes
diff --git a/sys/arch/mvme68k/dev/rd_root.c b/sys/arch/mvme68k/dev/rd_root.c
deleted file mode 100644
index 2840e605217..00000000000
--- a/sys/arch/mvme68k/dev/rd_root.c
+++ /dev/null
@@ -1,75 +0,0 @@
-/* $NetBSD: rd_root.c,v 1.1 1996/05/20 01:17:31 chuck Exp $ */
-
-/*
- * Copyright (c) 1995 Gordon W. Ross
- * All rights reserved.
- *
- * 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. The name of the author may not be used to endorse or promote products
- * derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``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 AUTHOR 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.
- */
-
-#include <sys/param.h>
-#include <sys/reboot.h>
-
-#include <dev/ramdisk.h>
-
-extern int boothowto;
-
-#ifndef MINIROOTSIZE
-#define MINIROOTSIZE 512
-#endif
-
-#define ROOTBYTES (MINIROOTSIZE << DEV_BSHIFT)
-
-/*
- * This array will be patched to contain a file-system image.
- * See the program: src/distrib/sun3/common/rdsetroot.c
- */
-int rd_root_size = ROOTBYTES;
-char rd_root_image[ROOTBYTES] = "|This is the root ramdisk!\n";
-
-/*
- * This is called during autoconfig.
- */
-void
-rd_attach_hook(unit, rd)
- int unit;
- struct rd_conf *rd;
-{
- if (unit == 0) {
- /* Setup root ramdisk */
- rd->rd_addr = (caddr_t) rd_root_image;
- rd->rd_size = (size_t) rd_root_size;
- rd->rd_type = RD_KMEM_FIXED;
- printf(" fixed, %d blocks", MINIROOTSIZE);
- }
-}
-
-/*
- * This is called during open (i.e. mountroot)
- */
-void
-rd_open_hook(unit, rd)
- int unit;
- struct rd_conf *rd;
-{
-}
diff --git a/sys/arch/mvme88k/conf/files.mvme88k b/sys/arch/mvme88k/conf/files.mvme88k
index a8add2b59db..09fe0e838a2 100644
--- a/sys/arch/mvme88k/conf/files.mvme88k
+++ b/sys/arch/mvme88k/conf/files.mvme88k
@@ -1,4 +1,4 @@
-# $OpenBSD: files.mvme88k,v 1.8 2001/03/07 01:58:19 miod Exp $
+# $OpenBSD: files.mvme88k,v 1.9 2001/05/11 06:41:45 deraadt Exp $
#
maxpartitions 16
@@ -79,7 +79,7 @@ file arch/mvme88k/dev/vmes.c vmes needs-count
file arch/mvme88k/dev/vmel.c vmel needs-count
#ramdisk support
-file arch/mvme88k/dev/rd_root.c ramdisk_hooks
+file dev/rd.c ramdisk_hooks
# list of standard files
file dev/cons.c ite | ser | tty
diff --git a/sys/arch/mvme88k/dev/rd_root.c b/sys/arch/mvme88k/dev/rd_root.c
deleted file mode 100644
index 1d952240d64..00000000000
--- a/sys/arch/mvme88k/dev/rd_root.c
+++ /dev/null
@@ -1,80 +0,0 @@
-/* $OpenBSD: rd_root.c,v 1.1 1998/12/15 05:52:30 smurph Exp $ */
-
-/*
- * Copyright (c) 1995 Gordon W. Ross
- * All rights reserved.
- *
- * 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. The name of the author may not be used to endorse or promote products
- * derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``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 AUTHOR 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.
- */
-
-#include <sys/param.h>
-#include <sys/reboot.h>
-
-#include <dev/ramdisk.h>
-
-extern int boothowto;
-
-#ifndef MINIROOTSIZE
-#define MINIROOTSIZE 512
-#endif
-
-#define ROOTBYTES (MINIROOTSIZE << DEV_BSHIFT)
-
-/*
- * This array will be patched to contain a file-system image.
- * See the program: src/distrib/sun3/common/rdsetroot.c
- */
-int rd_root_size = ROOTBYTES;
-char rd_root_image[ROOTBYTES] = "|This is the root ramdisk!\n";
-
-/*
- * This is called during autoconfig.
- */
-void
-rd_attach_hook(unit, rd)
- int unit;
- struct rd_conf *rd;
-{
- if (unit == 0) {
- /* Setup root ramdisk */
- rd->rd_addr = (caddr_t) rd_root_image;
- rd->rd_size = (size_t) rd_root_size;
- rd->rd_type = RD_KMEM_FIXED;
- printf("rd%d: fixed, %d blocks\n", unit, MINIROOTSIZE);
- }
-}
-
-/*
- * This is called during open (i.e. mountroot)
- */
-void
-rd_open_hook(unit, rd)
- int unit;
- struct rd_conf *rd;
-{
- if (unit == 0) {
- /* The root ramdisk only works single-user. */
- boothowto |= RB_SINGLE;
- printf("rd%d: mounting root, single user mode.\n", unit);
- }
-}
diff --git a/sys/arch/pmax/conf/files.pmax b/sys/arch/pmax/conf/files.pmax
index b69f1affc9a..04790b39e2e 100644
--- a/sys/arch/pmax/conf/files.pmax
+++ b/sys/arch/pmax/conf/files.pmax
@@ -1,4 +1,4 @@
-# $OpenBSD: files.pmax,v 1.13 2000/08/19 18:43:30 maja Exp $
+# $OpenBSD: files.pmax,v 1.14 2001/05/11 06:41:46 deraadt Exp $
# $NetBSD: files.pmax,v 1.36 1996/10/13 05:28:48 jonathan Exp $
# DECstation-specific configuration info
@@ -66,7 +66,7 @@ major { tz = 10 }
major { rz = 21 }
# RAM Disk for install floppy
-file arch/pmax/pmax/rd_root.c ramdisk_hooks
+file dev/rd.c ramdisk_hooks
major { rd = 25 }
#
diff --git a/sys/arch/pmax/pmax/rd_root.c b/sys/arch/pmax/pmax/rd_root.c
deleted file mode 100644
index 9e306993701..00000000000
--- a/sys/arch/pmax/pmax/rd_root.c
+++ /dev/null
@@ -1,77 +0,0 @@
-/* $OpenBSD: rd_root.c,v 1.1 1998/11/09 05:40:00 millert Exp $ */
-
-/*
- * Copyright (c) 1995 Gordon W. Ross
- * All rights reserved.
- *
- * 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. The name of the author may not be used to endorse or promote products
- * derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``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 AUTHOR 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.
- */
-
-#include <sys/param.h>
-#include <sys/systm.h>
-#include <sys/reboot.h>
-
-#include <dev/ramdisk.h>
-
-extern int boothowto;
-
-#ifndef MINIROOTSIZE
-#define MINIROOTSIZE 512
-#endif
-
-#define ROOTBYTES (MINIROOTSIZE << DEV_BSHIFT)
-
-/*
- * This array will be patched to contain a file-system image.
- * See the program: src/distrib/pmax/ecoffrdsetroot.c
- */
-int rd_root_size = ROOTBYTES;
-char rd_root_image[ROOTBYTES] = "|This is the root ramdisk!\n";
-
-/*
- * This is called during autoconfig.
- */
-void
-rd_attach_hook(unit, rd)
- int unit;
- struct rd_conf *rd;
-{
- if (unit == 0) {
- /* Setup root ramdisk */
- rd->rd_addr = (caddr_t) rd_root_image;
- rd->rd_size = (size_t) rd_root_size;
- rd->rd_type = RD_KMEM_FIXED;
- printf("rd%d: fixed, %d byte blocks, %dK total\n",
- unit, MINIROOTSIZE, ROOTBYTES / 1024);
- }
-}
-
-/*
- * This is called during open (i.e. mountroot)
- */
-void
-rd_open_hook(unit, rd)
- int unit;
- struct rd_conf *rd;
-{
-}
diff --git a/sys/arch/powerpc/conf/files.powerpc b/sys/arch/powerpc/conf/files.powerpc
index 35af2227061..9aa3874c66e 100644
--- a/sys/arch/powerpc/conf/files.powerpc
+++ b/sys/arch/powerpc/conf/files.powerpc
@@ -72,7 +72,7 @@ major { ofdisk = 4 }
file arch/powerpc/mac/uni_n.c ofbus
-file arch/powerpc/powerpc/rd_root.c ramdisk_hooks
+file dev/rd.c ramdisk_hooks
major {rd = 17}
include "dev/pci/files.pci"
diff --git a/sys/arch/powerpc/powerpc/rd_root.c b/sys/arch/powerpc/powerpc/rd_root.c
deleted file mode 100644
index d7c81eec986..00000000000
--- a/sys/arch/powerpc/powerpc/rd_root.c
+++ /dev/null
@@ -1,75 +0,0 @@
-/* $NetBSD: rd_root.c,v 1.2 1996/03/27 16:38:33 perry Exp $ */
-
-/*
- * Copyright (c) 1995 Gordon W. Ross
- * All rights reserved.
- *
- * 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. The name of the author may not be used to endorse or promote products
- * derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``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 AUTHOR 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.
- */
-
-#include <sys/param.h>
-#include <sys/reboot.h>
-
-#include <dev/ramdisk.h>
-
-extern int boothowto;
-
-#ifndef MINIROOTSIZE
-#define MINIROOTSIZE 512
-#endif
-
-#define ROOTBYTES (MINIROOTSIZE << DEV_BSHIFT)
-
-/*
- * This array will be patched to contain a file-system image.
- * See the program: src/distrib/sun3/common/rdsetroot.c
- */
-int rd_root_size = ROOTBYTES;
-char rd_root_image[ROOTBYTES] = "|This is the root ramdisk!\n";
-
-/*
- * This is called during autoconfig.
- */
-void
-rd_attach_hook(unit, rd)
- int unit;
- struct rd_conf *rd;
-{
- if (unit == 0) {
- /* Setup root ramdisk */
- rd->rd_addr = (caddr_t) rd_root_image;
- rd->rd_size = (size_t) rd_root_size;
- rd->rd_type = RD_KMEM_FIXED;
- printf("rd%d: fixed, %d blocks\n", unit, MINIROOTSIZE);
- }
-}
-
-/*
- * This is called during open (i.e. mountroot)
- */
-void
-rd_open_hook(unit, rd)
- int unit;
- struct rd_conf *rd;
-{
-}
diff --git a/sys/arch/sparc/conf/files.sparc b/sys/arch/sparc/conf/files.sparc
index 47cf56c9d40..2b7a81ba95c 100644
--- a/sys/arch/sparc/conf/files.sparc
+++ b/sys/arch/sparc/conf/files.sparc
@@ -1,4 +1,4 @@
-# $OpenBSD: files.sparc,v 1.38 2000/11/16 15:47:56 jason Exp $
+# $OpenBSD: files.sparc,v 1.39 2001/05/11 06:41:48 deraadt Exp $
# $NetBSD: files.sparc,v 1.44 1997/08/31 21:29:16 pk Exp $
# @(#)files.sparc 8.1 (Berkeley) 7/19/93
@@ -92,7 +92,7 @@ major { vnd = 8 }
major { cd = 18 }
# RAM Disk for install floppy
-file arch/sparc/sparc/rd_root.c ramdisk_hooks
+file dev/rd.c ramdisk_hooks
major {rd = 17}
device dma {}
diff --git a/sys/arch/sparc/sparc/rd_root.c b/sys/arch/sparc/sparc/rd_root.c
deleted file mode 100644
index ab44958b3d4..00000000000
--- a/sys/arch/sparc/sparc/rd_root.c
+++ /dev/null
@@ -1,77 +0,0 @@
-/* $OpenBSD: rd_root.c,v 1.3 1998/07/19 16:08:18 deraadt Exp $ */
-/* $NetBSD: rd_root.c,v 1.2 1996/03/27 16:38:33 perry Exp $ */
-
-/*
- * Copyright (c) 1995 Gordon W. Ross
- * All rights reserved.
- *
- * 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. The name of the author may not be used to endorse or promote products
- * derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``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 AUTHOR 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.
- */
-
-#include <sys/param.h>
-#include <sys/systm.h>
-#include <sys/reboot.h>
-
-#include <dev/ramdisk.h>
-
-extern int boothowto;
-
-#ifndef MINIROOTSIZE
-#define MINIROOTSIZE 512
-#endif
-
-#define ROOTBYTES (MINIROOTSIZE << DEV_BSHIFT)
-
-/*
- * This array will be patched to contain a file-system image.
- * See the program: src/distrib/sun3/common/rdsetroot.c
- */
-int rd_root_size = ROOTBYTES;
-char rd_root_image[ROOTBYTES] = "|This is the root ramdisk!\n";
-
-/*
- * This is called during autoconfig.
- */
-void
-rd_attach_hook(unit, rd)
- int unit;
- struct rd_conf *rd;
-{
- if (unit == 0) {
- /* Setup root ramdisk */
- rd->rd_addr = (caddr_t) rd_root_image;
- rd->rd_size = (size_t) rd_root_size;
- rd->rd_type = RD_KMEM_FIXED;
- printf("rd%d: fixed, %d blocks\n", unit, MINIROOTSIZE);
- }
-}
-
-/*
- * This is called during open (i.e. mountroot)
- */
-void
-rd_open_hook(unit, rd)
- int unit;
- struct rd_conf *rd;
-{
-}
diff --git a/sys/arch/sun3/conf/files.sun3 b/sys/arch/sun3/conf/files.sun3
index 806ed1daf36..b9121b8ec9b 100644
--- a/sys/arch/sun3/conf/files.sun3
+++ b/sys/arch/sun3/conf/files.sun3
@@ -1,4 +1,4 @@
-# $OpenBSD: files.sun3,v 1.15 2000/08/28 21:51:03 miod Exp $
+# $OpenBSD: files.sun3,v 1.16 2001/05/11 06:41:49 deraadt Exp $
# $NetBSD: files.sun3,v 1.26 1996/10/29 19:58:14 gwr Exp $
#
@@ -178,7 +178,7 @@ file arch/sun3/dev/ms.c ms needs-flag
# RAM Disk for boot tape
-file arch/sun3/dev/rd_root.c ramdisk_hooks
+file dev/rd.c ramdisk_hooks
# Major numbers for root/swap device configuration
major {xy=3} # Xylogics 450 and 451
diff --git a/sys/arch/sun3/dev/rd_root.c b/sys/arch/sun3/dev/rd_root.c
deleted file mode 100644
index ed2a198d47e..00000000000
--- a/sys/arch/sun3/dev/rd_root.c
+++ /dev/null
@@ -1,86 +0,0 @@
-/* $OpenBSD: rd_root.c,v 1.8 2000/08/28 21:55:42 miod Exp $ */
-/* $NetBSD: rd_root.c,v 1.7 1996/11/20 18:56:58 gwr Exp $ */
-
-/*-
- * Copyright (c) 1996 The NetBSD Foundation, Inc.
- * All rights reserved.
- *
- * This code is derived from software contributed to The NetBSD Foundation
- * by Gordon W. Ross.
- *
- * 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. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the NetBSD
- * Foundation, Inc. and its contributors.
- * 4. Neither the name of The NetBSD Foundation 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 NETBSD FOUNDATION, INC. 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.
- */
-
-#include <sys/param.h>
-#include <sys/systm.h>
-#include <sys/reboot.h>
-
-#include <dev/ramdisk.h>
-
-extern int boothowto;
-
-#ifndef MINIROOTSIZE
-#define MINIROOTSIZE 512
-#endif
-
-#define ROOTBYTES (MINIROOTSIZE << DEV_BSHIFT)
-
-/*
- * This array will be patched to contain a file-system image.
- * See the program: src/distrib/sun3/common/rdsetroot.c
- */
-int rd_root_size = ROOTBYTES;
-char rd_root_image[ROOTBYTES] = "|This is the root ramdisk!\n";
-
-/*
- * This is called during autoconfig.
- */
-void
-rd_attach_hook(unit, rd)
- int unit;
- struct rd_conf *rd;
-{
- if (unit == 0) {
- /* Setup root ramdisk */
- rd->rd_addr = (caddr_t) rd_root_image;
- rd->rd_size = (size_t) rd_root_size;
- rd->rd_type = RD_KMEM_FIXED;
- printf("rd%d: fixed, %d blocks\n", unit, MINIROOTSIZE);
- }
-}
-
-/*
- * This is called during open (i.e. mountroot)
- */
-void
-rd_open_hook(unit, rd)
- int unit;
- struct rd_conf *rd;
-{
-}
diff --git a/sys/arch/vax/conf/files.vax b/sys/arch/vax/conf/files.vax
index b075948c4a7..166f5446937 100644
--- a/sys/arch/vax/conf/files.vax
+++ b/sys/arch/vax/conf/files.vax
@@ -1,4 +1,4 @@
-# $OpenBSD: files.vax,v 1.21 2001/04/17 15:19:33 hugh Exp $
+# $OpenBSD: files.vax,v 1.22 2001/05/11 06:41:51 deraadt Exp $
# $NetBSD: files.vax,v 1.60 1999/08/27 20:04:32 ragge Exp $
#
# new style config file for vax architecture
@@ -127,7 +127,7 @@ attach ry at hdc
major {ry = 24}
# RAM Disk for install floppy
-file arch/vax/vax/rd_root.c ramdisk_hooks
+file dev/rd.c ramdisk_hooks
major {rd = 23}
#
diff --git a/sys/arch/vax/vax/rd_root.c b/sys/arch/vax/vax/rd_root.c
deleted file mode 100644
index 5b90686b82c..00000000000
--- a/sys/arch/vax/vax/rd_root.c
+++ /dev/null
@@ -1,77 +0,0 @@
-/* $OpenBSD: rd_root.c,v 1.1 2000/10/31 02:30:57 hugh Exp $ */
-/* $NetBSD: rd_root.c,v 1.2 1996/03/27 16:38:33 perry Exp $ */
-
-/*
- * Copyright (c) 1995 Gordon W. Ross
- * All rights reserved.
- *
- * 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. The name of the author may not be used to endorse or promote products
- * derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``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 AUTHOR 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.
- */
-
-#include <sys/param.h>
-#include <sys/systm.h>
-#include <sys/reboot.h>
-
-#include <dev/ramdisk.h>
-
-extern int boothowto;
-
-#ifndef MINIROOTSIZE
-#define MINIROOTSIZE 4096
-#endif
-
-#define ROOTBYTES (MINIROOTSIZE << DEV_BSHIFT)
-
-/*
- * This array will be patched to contain a file-system image.
- * See the program: src/distrib/sun3/common/rdsetroot.c
- */
-int rd_root_size = ROOTBYTES;
-char rd_root_image[ROOTBYTES] = "|This is the root ramdisk!\n";
-
-/*
- * This is called during autoconfig.
- */
-void
-rd_attach_hook(unit, rd)
- int unit;
- struct rd_conf *rd;
-{
- if (unit == 0) {
- /* Setup root ramdisk */
- rd->rd_addr = (caddr_t) rd_root_image;
- rd->rd_size = (size_t) rd_root_size;
- rd->rd_type = RD_KMEM_FIXED;
- printf("rd%d: fixed, %d blocks\n", unit, MINIROOTSIZE);
- }
-}
-
-/*
- * This is called during open (i.e. mountroot)
- */
-void
-rd_open_hook(unit, rd)
- int unit;
- struct rd_conf *rd;
-{
-}