summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--etc/MAKEDEV.common4
-rw-r--r--etc/Makefile4
-rw-r--r--etc/ccd.conf5
-rw-r--r--etc/changelist3
-rw-r--r--etc/etc.alpha/MAKEDEV.md4
-rw-r--r--etc/etc.amd64/MAKEDEV.md4
-rw-r--r--etc/etc.armish/MAKEDEV.md4
-rw-r--r--etc/etc.aviion/MAKEDEV.md4
-rw-r--r--etc/etc.hp300/MAKEDEV.md12
-rw-r--r--etc/etc.hppa/MAKEDEV.md4
-rw-r--r--etc/etc.hppa64/MAKEDEV.md4
-rw-r--r--etc/etc.i386/MAKEDEV.md4
-rw-r--r--etc/etc.landisk/MAKEDEV.md4
-rw-r--r--etc/etc.loongson/MAKEDEV.md4
-rw-r--r--etc/etc.luna88k/MAKEDEV.md4
-rw-r--r--etc/etc.mac68k/MAKEDEV.md4
-rw-r--r--etc/etc.macppc/MAKEDEV.md4
-rw-r--r--etc/etc.mvme68k/MAKEDEV.md4
-rw-r--r--etc/etc.mvme88k/MAKEDEV.md4
-rw-r--r--etc/etc.palm/MAKEDEV.md4
-rw-r--r--etc/etc.sgi/MAKEDEV.md4
-rw-r--r--etc/etc.socppc/MAKEDEV.md4
-rw-r--r--etc/etc.sparc/MAKEDEV.md4
-rw-r--r--etc/etc.sparc64/MAKEDEV.md4
-rw-r--r--etc/etc.vax/MAKEDEV.md18
-rw-r--r--etc/etc.zaurus/MAKEDEV.md4
-rw-r--r--etc/rc7
-rw-r--r--sbin/Makefile4
-rw-r--r--sbin/ccdconfig/Makefile13
-rw-r--r--sbin/ccdconfig/ccdconfig.8133
-rw-r--r--sbin/ccdconfig/ccdconfig.c724
-rw-r--r--sbin/ccdconfig/pathnames.h33
-rw-r--r--share/man/man4/Makefile4
-rw-r--r--share/man/man4/ccd.4148
-rw-r--r--sys/arch/alpha/alpha/conf.c9
-rw-r--r--sys/arch/alpha/conf/files.alpha3
-rw-r--r--sys/arch/amd64/amd64/conf.c11
-rw-r--r--sys/arch/amd64/conf/RAMDISK3
-rw-r--r--sys/arch/amd64/conf/RAMDISK_CD3
-rw-r--r--sys/arch/amd64/conf/files.amd643
-rw-r--r--sys/arch/arm/arm/conf.c9
-rw-r--r--sys/arch/aviion/aviion/conf.c9
-rw-r--r--sys/arch/hp300/hp300/conf.c9
-rw-r--r--sys/arch/hppa/conf/RAMDISK3
-rw-r--r--sys/arch/hppa/conf/files.hppa3
-rw-r--r--sys/arch/hppa/hppa/conf.c9
-rw-r--r--sys/arch/hppa64/conf/RAMDISK3
-rw-r--r--sys/arch/hppa64/conf/files.hppa643
-rw-r--r--sys/arch/hppa64/hppa64/conf.c9
-rw-r--r--sys/arch/i386/conf/RAMDISK_CD3
-rw-r--r--sys/arch/i386/conf/files.i3864
-rw-r--r--sys/arch/i386/i386/conf.c9
-rw-r--r--sys/arch/landisk/landisk/conf.c9
-rw-r--r--sys/arch/loongson/loongson/conf.c10
-rw-r--r--sys/arch/luna88k/luna88k/conf.c9
-rw-r--r--sys/arch/mac68k/mac68k/conf.c10
-rw-r--r--sys/arch/macppc/macppc/conf.c9
-rw-r--r--sys/arch/mvme68k/mvme68k/conf.c9
-rw-r--r--sys/arch/mvme88k/mvme88k/conf.c9
-rw-r--r--sys/arch/octeon/octeon/conf.c10
-rw-r--r--sys/arch/sgi/sgi/conf.c10
-rw-r--r--sys/arch/socppc/socppc/conf.c9
-rw-r--r--sys/arch/sparc/sparc/conf.c7
-rw-r--r--sys/arch/sparc64/sparc64/conf.c7
-rw-r--r--sys/arch/vax/vax/conf.c10
-rw-r--r--sys/conf/GENERIC3
-rw-r--r--sys/conf/files4
-rw-r--r--sys/dev/ccd.c1345
-rw-r--r--sys/dev/ccdvar.h184
-rw-r--r--sys/sys/conf.h5
-rw-r--r--usr.bin/kdump/Makefile3
-rw-r--r--usr.bin/kdump/mkioctls3
72 files changed, 140 insertions, 2822 deletions
diff --git a/etc/MAKEDEV.common b/etc/MAKEDEV.common
index e551a7c3d9b..d494ff8c303 100644
--- a/etc/MAKEDEV.common
+++ b/etc/MAKEDEV.common
@@ -1,4 +1,4 @@
-vers(a, {-$OpenBSD: MAKEDEV.common,v 1.56 2011/07/06 18:34:20 miod Exp $-})dnl
+vers(a, {-$OpenBSD: MAKEDEV.common,v 1.57 2011/10/06 20:49:25 deraadt Exp $-})dnl
dnl
dnl Copyright (c) 2001-2006 Todd T. Fries <todd@OpenBSD.org>
dnl
@@ -265,7 +265,6 @@ _mkdev(flo, fd*,
__devitem(iop, iop*, I2O controller devices)dnl
_mcdev(iop, iop*, iop, {-major_iop_c-}, 660)dnl
__devitem(wd, {-wd*-}, {-quote(winchester)disk drives (ST506{-,-} IDE{-,-} ESDI{-,-} RLL{-,-} ...)-})dnl
-__devitem(ccd, ccd*, Concatenated disk devices)dnl
__devitem(raid, raid*, RAIDframe disk devices)dnl
__devitem(vnd, vnd*, quote(file)pseudo-disk devices)dnl
_mkdev(vnd, vnd*, {-dodisk vnd $U major_vnd_b major_vnd_c $U 0{--}ifstep(vnd)-})dnl
@@ -275,7 +274,6 @@ dnl
dnl For normal disk devices, add a disk_q entry; anything else define like
dnl the rest (such as vnd above).
dnl
-disk_q({-ccd-})dnl
disk_q({-hd-})dnl
disk_q({-ra-})dnl
disk_q({-raid-})dnl
diff --git a/etc/Makefile b/etc/Makefile
index 19faf416def..e13c557ed29 100644
--- a/etc/Makefile
+++ b/etc/Makefile
@@ -1,4 +1,4 @@
-# $OpenBSD: Makefile,v 1.309 2011/07/22 09:30:54 espie Exp $
+# $OpenBSD: Makefile,v 1.310 2011/10/06 20:49:25 deraadt Exp $
TZDIR= /usr/share/zoneinfo
LOCALTIME= Canada/Mountain
@@ -30,7 +30,7 @@ kernels: bootblocks ${ALL_KERNELS}
# -rw-r--r--
BINOWN= root
BINGRP= wheel
-BIN1= changelist ccd.conf csh.cshrc csh.login csh.logout daily dhcpd.conf \
+BIN1= changelist csh.cshrc csh.login csh.logout daily dhcpd.conf \
exports ftpusers ftpchroot gettytab group hosts hosts.lpd inetd.conf \
ksh.kshrc locate.rc man.conf monthly motd mrouted.conf myname \
netstart networks newsyslog.conf printcap protocols \
diff --git a/etc/ccd.conf b/etc/ccd.conf
deleted file mode 100644
index 8e84e4b56f6..00000000000
--- a/etc/ccd.conf
+++ /dev/null
@@ -1,5 +0,0 @@
-# $OpenBSD: ccd.conf,v 1.1 1996/08/24 20:52:22 deraadt Exp $
-# Configuration file for concatenated disk devices
-#
-# ccd ileave flags component devices
-#ccd0 16 none /dev/sd2e /dev/sd3e
diff --git a/etc/changelist b/etc/changelist
index d17a9e81dc1..e5c1bb83233 100644
--- a/etc/changelist
+++ b/etc/changelist
@@ -1,4 +1,4 @@
-# $OpenBSD: changelist,v 1.74 2011/07/07 06:15:53 schwarze Exp $
+# $OpenBSD: changelist,v 1.75 2011/10/06 20:49:25 deraadt Exp $
#
# List of files which the security script backs up and checks
# for modifications.
@@ -13,7 +13,6 @@
/etc/bgpd.conf
/etc/boot.conf
/etc/bootparams
-/etc/ccd.conf
/etc/changelist
/etc/chio.conf
/etc/crontab
diff --git a/etc/etc.alpha/MAKEDEV.md b/etc/etc.alpha/MAKEDEV.md
index bd8567579d6..4dc7f5c716d 100644
--- a/etc/etc.alpha/MAKEDEV.md
+++ b/etc/etc.alpha/MAKEDEV.md
@@ -1,6 +1,6 @@
define(MACHINE,alpha)dnl
vers(__file__,
- {-$OpenBSD: MAKEDEV.md,v 1.51 2010/11/19 20:55:46 miod Exp $-},
+ {-$OpenBSD: MAKEDEV.md,v 1.52 2011/10/06 20:49:27 deraadt Exp $-},
etc.MACHINE)dnl
dnl
dnl Copyright (c) 2001-2006 Todd T. Fries <todd@OpenBSD.org>
@@ -24,7 +24,6 @@ _DEV(ramdisk)
_DEV(std)
_DEV(local)
_TITLE(dis)
-_DEV(ccd, 27, 7)
_DEV(cd, 13, 3)
_DEV(flo, 37, 4)
_DEV(raid, 43, 16)
@@ -128,6 +127,5 @@ target(all, rd, 0)dnl
target(all, cd, 0, 1)dnl
target(all, sd, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9)dnl
target(all, vnd, 0, 1, 2, 3)dnl
-target(all, ccd, 0, 1, 2, 3)dnl
target(all, bthub, 0, 1, 2)dnl
target(ramd, ttyB, 0, 1)dnl
diff --git a/etc/etc.amd64/MAKEDEV.md b/etc/etc.amd64/MAKEDEV.md
index 427e59d92dc..bc667e88a0c 100644
--- a/etc/etc.amd64/MAKEDEV.md
+++ b/etc/etc.amd64/MAKEDEV.md
@@ -1,6 +1,6 @@
define(MACHINE,amd64)dnl
vers(__file__,
- {-$OpenBSD: MAKEDEV.md,v 1.44 2011/06/26 23:28:23 tedu Exp $-},
+ {-$OpenBSD: MAKEDEV.md,v 1.45 2011/10/06 20:49:27 deraadt Exp $-},
etc.MACHINE)dnl
dnl
dnl Copyright (c) 2001-2006 Todd T. Fries <todd@OpenBSD.org>
@@ -30,7 +30,6 @@ _DEV(ramdisk)
_DEV(std)
_DEV(local)
_TITLE(dis)
-_DEV(ccd, 18, 16)
_DEV(cd, 15, 6)
_DEV(flo, 9, 2)
_DEV(raid, 54, 19)
@@ -136,7 +135,6 @@ target(all, rd, 0)dnl
target(all, cd, 0, 1)dnl
target(all, sd, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9)dnl
target(all, vnd, 0, 1, 2, 3)dnl
-target(all, ccd, 0, 1, 2, 3)dnl
target(all, bktr, 0)dnl
target(all, gpio, 0, 1, 2)dnl
target(all, nvram)dnl
diff --git a/etc/etc.armish/MAKEDEV.md b/etc/etc.armish/MAKEDEV.md
index 6eea7427fd4..a60117713e9 100644
--- a/etc/etc.armish/MAKEDEV.md
+++ b/etc/etc.armish/MAKEDEV.md
@@ -1,6 +1,6 @@
define(MACHINE,armish)dnl
vers(__file__,
- {-$OpenBSD: MAKEDEV.md,v 1.21 2010/09/30 15:27:54 claudio Exp $-},
+ {-$OpenBSD: MAKEDEV.md,v 1.22 2011/10/06 20:49:27 deraadt Exp $-},
etc.MACHINE)dnl
dnl
dnl Copyright (c) 2001-2004 Todd T. Fries <todd@OpenBSD.org>
@@ -33,7 +33,6 @@ _DEV(ramdisk)
_DEV(std)
_DEV(local)
_TITLE(dis)
-_DEV(ccd, 21, 21)
_DEV(cd, 26, 26)
_DEV(ch, 27)
_DEV(raid, 71, 71)
@@ -121,5 +120,4 @@ target(all, rd, 0)dnl
target(all, cd, 0, 1)dnl
target(all, sd, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9)dnl
target(all, vnd, 0, 1, 2, 3)dnl
-target(all, ccd, 0, 1, 2, 3)dnl
target(all, bthub, 0, 1, 2)dnl
diff --git a/etc/etc.aviion/MAKEDEV.md b/etc/etc.aviion/MAKEDEV.md
index 751b4165d7e..32785a3cc41 100644
--- a/etc/etc.aviion/MAKEDEV.md
+++ b/etc/etc.aviion/MAKEDEV.md
@@ -1,6 +1,6 @@
define(MACHINE,aviion)dnl
vers(__file__,
- {-$OpenBSD: MAKEDEV.md,v 1.13 2010/09/30 15:27:54 claudio Exp $-},
+ {-$OpenBSD: MAKEDEV.md,v 1.14 2011/10/06 20:49:27 deraadt Exp $-},
etc.MACHINE)dnl
dnl
dnl Copyright (c) 2001-2006 Todd T. Fries <todd@OpenBSD.org>
@@ -58,7 +58,6 @@ target(all, cd, 0, 1)dnl
target(all, sd, 0, 1, 2, 3, 4)dnl
target(all, uk, 0)dnl
target(all, vnd, 0, 1, 2, 3)dnl
-target(all, ccd, 0, 1, 2, 3)dnl
twrget(all, dart, tty, a, b, c)dnl
_DEV(all)
dnl
@@ -73,7 +72,6 @@ _DEV(std)
_DEV(local)
dnl
_TITLE(dis)
-_DEV(ccd, 17, 9)
_DEV(cd, 9, 6)
_DEV(rd, 18, 7)
_DEV(sd, 8, 4)
diff --git a/etc/etc.hp300/MAKEDEV.md b/etc/etc.hp300/MAKEDEV.md
index e8fddd8a325..0646477a8d0 100644
--- a/etc/etc.hp300/MAKEDEV.md
+++ b/etc/etc.hp300/MAKEDEV.md
@@ -1,6 +1,6 @@
define(MACHINE,hp300)dnl
vers(__file__,
- {-$OpenBSD: MAKEDEV.md,v 1.42 2010/11/19 20:55:48 miod Exp $-},
+ {-$OpenBSD: MAKEDEV.md,v 1.43 2011/10/06 20:49:27 deraadt Exp $-},
etc.MACHINE)dnl
dnl
dnl Copyright (c) 2001-2006 Todd T. Fries <todd@OpenBSD.org>
@@ -50,7 +50,6 @@ _DEV(ramdisk)
_DEV(std)
_DEV(local)
_TITLE(dis)
-_DEV(ccd, 17, 5)
_DEV(cd, 18, 9)
_DEV(hd, 9, 2)
_DEV(rd, 34, 8)
@@ -185,11 +184,10 @@ target(all, sd, 0, 1, 2, 3, 4)dnl
target(all, st, 0, 1)dnl
target(all, uk, 0)dnl
target(all, vnd, 0, 1, 2, 3)dnl
-target(all, ccd, 0, 1, 2, 3)dnl
-target( all, dca, 0, 1)dnl
-target( all, dcm, 0, 1, 2, 3)dnl
-target( all, hd, 0, 1, 2)dnl
-target( all, ct, 0, 1)dnl
+target(all, dca, 0, 1)dnl
+target(all, dcm, 0, 1, 2, 3)dnl
+target(all, hd, 0, 1, 2)dnl
+target(all, ct, 0, 1)dnl
target(ramd, ct, 0, 1)dnl
target(ramd, hd, 0, 1, 2)dnl
target(ramd, pty, 0)dnl
diff --git a/etc/etc.hppa/MAKEDEV.md b/etc/etc.hppa/MAKEDEV.md
index 75bab0b41db..ae9c7f7a6e7 100644
--- a/etc/etc.hppa/MAKEDEV.md
+++ b/etc/etc.hppa/MAKEDEV.md
@@ -1,6 +1,6 @@
define(MACHINE,hppa)dnl
vers(__file__,
- {-$OpenBSD: MAKEDEV.md,v 1.45 2010/09/30 15:27:54 claudio Exp $-},
+ {-$OpenBSD: MAKEDEV.md,v 1.46 2011/10/06 20:49:27 deraadt Exp $-},
etc.MACHINE)dnl
dnl
dnl Copyright (c) 2001-2006 Todd T. Fries <todd@OpenBSD.org>
@@ -24,7 +24,6 @@ _DEV(ramdisk)
_DEV(std)
_DEV(local)
_TITLE(dis)
-_DEV(ccd, 7, 1)
_DEV(cd, 12, 6)
_DEV(flo, 24, 7)
_DEV(sd, 10, 4)
@@ -109,7 +108,6 @@ target(all, rd, 0)dnl
target(all, cd, 0, 1)dnl
target(all, sd, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9)dnl
target(all, vnd, 0, 1, 2, 3)dnl
-target(all, ccd, 0, 1, 2, 3)dnl
target(all, bthub, 0, 1, 2)dnl
target(ramd, pty, 0)dnl
target(ramd, hil)dnl
diff --git a/etc/etc.hppa64/MAKEDEV.md b/etc/etc.hppa64/MAKEDEV.md
index 37545391b52..6185aeff229 100644
--- a/etc/etc.hppa64/MAKEDEV.md
+++ b/etc/etc.hppa64/MAKEDEV.md
@@ -1,6 +1,6 @@
define(MACHINE,hppa64)dnl
vers(__file__,
- {-$OpenBSD: MAKEDEV.md,v 1.22 2010/11/19 20:55:48 miod Exp $-},
+ {-$OpenBSD: MAKEDEV.md,v 1.23 2011/10/06 20:49:27 deraadt Exp $-},
etc.MACHINE)dnl
dnl
dnl Copyright (c) 2001-2006 Todd T. Fries <todd@OpenBSD.org>
@@ -24,7 +24,6 @@ _DEV(ramdisk)
_DEV(std)
_DEV(local)
_TITLE(dis)
-_DEV(ccd, 7, 1)
_DEV(cd, 12, 6)
_DEV(flo, 24, 7)
_DEV(sd, 10, 4)
@@ -107,7 +106,6 @@ target(all, rd, 0)dnl
target(all, cd, 0, 1)dnl
target(all, sd, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9)dnl
target(all, vnd, 0, 1, 2, 3)dnl
-target(all, ccd, 0, 1, 2, 3)dnl
target(ramd, pty, 0)dnl
target(ramd, hil)dnl
target(ramd, tun, 0, 1)dnl
diff --git a/etc/etc.i386/MAKEDEV.md b/etc/etc.i386/MAKEDEV.md
index 254efd43d13..996e9328362 100644
--- a/etc/etc.i386/MAKEDEV.md
+++ b/etc/etc.i386/MAKEDEV.md
@@ -1,6 +1,6 @@
define(MACHINE,i386)dnl
vers(__file__,
- {-$OpenBSD: MAKEDEV.md,v 1.59 2011/06/26 23:28:23 tedu Exp $-},
+ {-$OpenBSD: MAKEDEV.md,v 1.60 2011/10/06 20:49:27 deraadt Exp $-},
etc.MACHINE)dnl
dnl
dnl Copyright (c) 2001-2006 Todd T. Fries <todd@OpenBSD.org>
@@ -32,7 +32,6 @@ _DEV(ramdisk)
_DEV(std)
_DEV(local)
_TITLE(dis)
-_DEV(ccd, 18, 16)
_DEV(cd, 15, 6)
_DEV(flo, 9, 2)
_DEV(raid, 54, 19)
@@ -139,7 +138,6 @@ target(all, rd, 0)dnl
target(all, cd, 0, 1)dnl
target(all, sd, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9)dnl
target(all, vnd, 0, 1, 2, 3)dnl
-target(all, ccd, 0, 1, 2, 3)dnl
target(all, bktr, 0)dnl
target(all, gpio, 0, 1, 2)dnl
target(all, nvram)dnl
diff --git a/etc/etc.landisk/MAKEDEV.md b/etc/etc.landisk/MAKEDEV.md
index 0f86519e1c7..a053e19234d 100644
--- a/etc/etc.landisk/MAKEDEV.md
+++ b/etc/etc.landisk/MAKEDEV.md
@@ -1,6 +1,6 @@
define(MACHINE,landisk)dnl
vers(__file__,
- {-$OpenBSD: MAKEDEV.md,v 1.23 2010/09/30 15:27:54 claudio Exp $-},
+ {-$OpenBSD: MAKEDEV.md,v 1.24 2011/10/06 20:49:27 deraadt Exp $-},
etc.MACHINE)dnl
dnl
dnl Copyright (c) 2001-2004 Todd T. Fries <todd@OpenBSD.org>
@@ -39,7 +39,6 @@ _DEV(ramdisk)
_DEV(std)
_DEV(local)
_TITLE(dis)
-_DEV(ccd, 21, 21)
_DEV(cd, 26, 26)
_DEV(ch, 27)
_DEV(raid, 71, 71)
@@ -126,5 +125,4 @@ target(all, rd, 0)dnl
target(all, cd, 0, 1)dnl
target(all, sd, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9)dnl
target(all, vnd, 0, 1, 2, 3)dnl
-target(all, ccd, 0, 1, 2, 3)dnl
target(all, bthub, 0, 1, 2)dnl
diff --git a/etc/etc.loongson/MAKEDEV.md b/etc/etc.loongson/MAKEDEV.md
index f3df7a28ae7..762e52688f9 100644
--- a/etc/etc.loongson/MAKEDEV.md
+++ b/etc/etc.loongson/MAKEDEV.md
@@ -1,6 +1,6 @@
define(MACHINE,loongson)dnl
vers(__file__,
- {-$OpenBSD: MAKEDEV.md,v 1.10 2010/11/19 20:55:48 miod Exp $-},
+ {-$OpenBSD: MAKEDEV.md,v 1.11 2011/10/06 20:49:27 deraadt Exp $-},
etc.MACHINE)dnl
dnl
dnl Copyright (c) 2001-2006 Todd T. Fries <todd@OpenBSD.org>
@@ -33,7 +33,6 @@ _DEV(ramd)
_DEV(std)
_DEV(local)
_TITLE(dis)
-_DEV(ccd, 23, 6)
_DEV(cd, 8, 3)
_DEV(rd, 22, 8)
_DEV(sd, 9, 0)
@@ -108,7 +107,6 @@ target(all, rd, 0)dnl
target(all, cd, 0, 1)dnl
target(all, sd, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9)dnl
target(all, vnd, 0, 1, 2, 3)dnl
-target(all, ccd, 0, 1, 2, 3)dnl
target(all, bthub, 0, 1, 2)dnl
target(ramd, pty, 0)dnl
target(ramd, bio)dnl
diff --git a/etc/etc.luna88k/MAKEDEV.md b/etc/etc.luna88k/MAKEDEV.md
index d9e7190ebb0..5e5aa686f4e 100644
--- a/etc/etc.luna88k/MAKEDEV.md
+++ b/etc/etc.luna88k/MAKEDEV.md
@@ -1,6 +1,6 @@
define(MACHINE,luna88k)dnl
vers(__file__,
- {-$OpenBSD: MAKEDEV.md,v 1.17 2010/09/30 15:27:54 claudio Exp $-},
+ {-$OpenBSD: MAKEDEV.md,v 1.18 2011/10/06 20:49:27 deraadt Exp $-},
etc.MACHINE)dnl
dnl
dnl Copyright (c) 2001-2006 Todd T. Fries <todd@OpenBSD.org>
@@ -48,7 +48,6 @@ target(all, cd, 0, 1)dnl
target(all, sd, 0, 1, 2, 3, 4)dnl
target(all, uk, 0)dnl
target(all, vnd, 0, 1, 2, 3)dnl
-target(all, ccd, 0, 1, 2, 3)dnl
twrget(all, sio, tty, a)dnl
twrget(all, lcd, lcd)dnl
_DEV(all)
@@ -65,7 +64,6 @@ _DEV(std)
_DEV(local)
dnl
_TITLE(dis)
-_DEV(ccd, 17, 9)
_DEV(cd, 9, 6)
_DEV(rd, 18, 7)
_DEV(sd, 8, 4)
diff --git a/etc/etc.mac68k/MAKEDEV.md b/etc/etc.mac68k/MAKEDEV.md
index bb689228007..cd044303704 100644
--- a/etc/etc.mac68k/MAKEDEV.md
+++ b/etc/etc.mac68k/MAKEDEV.md
@@ -1,6 +1,6 @@
define(MACHINE,mac68k)dnl
vers(__file__,
- {-$OpenBSD: MAKEDEV.md,v 1.35 2010/09/30 15:27:54 claudio Exp $-},
+ {-$OpenBSD: MAKEDEV.md,v 1.36 2011/10/06 20:49:27 deraadt Exp $-},
etc.MACHINE)dnl
dnl
dnl Copyright (c) 2001-2006 Todd T. Fries <todd@OpenBSD.org>
@@ -28,7 +28,6 @@ _DEV(ramd)
_DEV(std)
_DEV(local)
_TITLE(dis)
-_DEV(ccd, 20, 9)
_DEV(cd, 15, 6)
_DEV(rd, 18, 13)
_DEV(sd, 13, 4)
@@ -114,7 +113,6 @@ target(all, tun, 0, 1, 2, 3)dnl
target(all, xy, 0, 1, 2, 3)dnl
target(all, rd, 0)dnl
target(all, cd, 0, 1)dnl
-target(all, ccd, 0, 1, 2, 3)dnl
target(ramd, asc, 0)dnl
twrget(ramd, mac_tty0, tty0, 0, 1)dnl
target(ramd, pty, 0)dnl
diff --git a/etc/etc.macppc/MAKEDEV.md b/etc/etc.macppc/MAKEDEV.md
index 027b7677044..e4632b03537 100644
--- a/etc/etc.macppc/MAKEDEV.md
+++ b/etc/etc.macppc/MAKEDEV.md
@@ -1,6 +1,6 @@
define(MACHINE,macppc)dnl
vers(__file__,
- {-$OpenBSD: MAKEDEV.md,v 1.46 2011/04/19 23:07:55 todd Exp $-},
+ {-$OpenBSD: MAKEDEV.md,v 1.47 2011/10/06 20:49:27 deraadt Exp $-},
etc.MACHINE)dnl
dnl
dnl Copyright (c) 2001-2006 Todd T. Fries <todd@OpenBSD.org>
@@ -41,7 +41,6 @@ _DEV(ramd)
_DEV(std)
_DEV(local)
_TITLE(dis)
-_DEV(ccd, 18, 16)
_DEV(cd, 9, 3)
_DEV(raid, 54, 19)
_DEV(rd, 17, 17)
@@ -130,7 +129,6 @@ target(all, rd, 0)dnl
target(all, cd, 0, 1)dnl
target(all, sd, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9)dnl
target(all, vnd, 0, 1, 2, 3)dnl
-target(all, ccd, 0, 1, 2, 3)dnl
target(all, gpio, 0, 1, 2)dnl
target(all, bio)dnl
target(all, bthub, 0, 1, 2)dnl
diff --git a/etc/etc.mvme68k/MAKEDEV.md b/etc/etc.mvme68k/MAKEDEV.md
index df1149d704f..f0797e3c2f8 100644
--- a/etc/etc.mvme68k/MAKEDEV.md
+++ b/etc/etc.mvme68k/MAKEDEV.md
@@ -1,6 +1,6 @@
define(MACHINE,mvme68k)dnl
vers(__file__,
- {-$OpenBSD: MAKEDEV.md,v 1.30 2010/09/30 15:27:54 claudio Exp $-},
+ {-$OpenBSD: MAKEDEV.md,v 1.31 2011/10/06 20:49:27 deraadt Exp $-},
etc.MACHINE)dnl
dnl
dnl Copyright (c) 2001-2006 Todd T. Fries <todd@OpenBSD.org>
@@ -117,7 +117,6 @@ target(all, cd, 0, 1)dnl
target(all, sd, 0, 1, 2, 3, 4)dnl
target(all, uk, 0)dnl
target(all, vnd, 0, 1, 2, 3)dnl
-target(all, ccd, 0, 1, 2, 3)dnl
twrget(all, mvme_tzs, tty, a, b, c, d)dnl
twrget(all, mvme_czs, cua, a, b, c, d)dnl
twrget(all, cl, tty0, 0, 1, 2, 3)dnl
@@ -138,7 +137,6 @@ _DEV(std)
_DEV(local)
dnl
_TITLE(dis)
-_DEV(ccd, 17, 5)
_DEV(cd, 9, 8)
_DEV(rd, 18, 9)
_DEV(sd, 8, 4)
diff --git a/etc/etc.mvme88k/MAKEDEV.md b/etc/etc.mvme88k/MAKEDEV.md
index ef735c5c842..46fb7de4126 100644
--- a/etc/etc.mvme88k/MAKEDEV.md
+++ b/etc/etc.mvme88k/MAKEDEV.md
@@ -1,6 +1,6 @@
define(MACHINE,mvme88k)dnl
vers(__file__,
- {-$OpenBSD: MAKEDEV.md,v 1.29 2010/09/30 15:27:54 claudio Exp $-},
+ {-$OpenBSD: MAKEDEV.md,v 1.30 2011/10/06 20:49:27 deraadt Exp $-},
etc.MACHINE)dnl
dnl
dnl Copyright (c) 2001-2006 Todd T. Fries <todd@OpenBSD.org>
@@ -84,7 +84,6 @@ target(all, cd, 0, 1)dnl
target(all, sd, 0, 1, 2, 3, 4)dnl
target(all, uk, 0)dnl
target(all, vnd, 0, 1, 2, 3)dnl
-target(all, ccd, 0, 1, 2, 3)dnl
twrget(all, dart, tty, a, b)dnl
twrget(all, cl, tty0, 0, 1, 2, 3, 4, 5, 6, 7)dnl
twrget(all, vx, ttyv, 0, 1, 2, 3, 4, 5, 6, 7)dnl
@@ -103,7 +102,6 @@ _DEV(std)
_DEV(local)
dnl
_TITLE(dis)
-_DEV(ccd, 17, 9)
_DEV(cd, 9, 6)
_DEV(rd, 18, 7)
_DEV(sd, 8, 4)
diff --git a/etc/etc.palm/MAKEDEV.md b/etc/etc.palm/MAKEDEV.md
index e9f9064c234..d327612c2d5 100644
--- a/etc/etc.palm/MAKEDEV.md
+++ b/etc/etc.palm/MAKEDEV.md
@@ -1,6 +1,6 @@
define(MACHINE,palm)dnl
vers(__file__,
- {-$OpenBSD: MAKEDEV.md,v 1.8 2010/09/30 15:27:54 claudio Exp $-},
+ {-$OpenBSD: MAKEDEV.md,v 1.9 2011/10/06 20:49:27 deraadt Exp $-},
etc.MACHINE)dnl
dnl
dnl Copyright (c) 2001-2004 Todd T. Fries <todd@OpenBSD.org>
@@ -33,7 +33,6 @@ _DEV(ramdisk)
_DEV(std)
_DEV(local)
_TITLE(dis)
-_DEV(ccd, 21, 21)
_DEV(cd, 26, 26)
_DEV(ch, 27)
_DEV(raid, 71, 71)
@@ -118,6 +117,5 @@ target(all, rd, 0)dnl
target(all, cd, 0, 1)dnl
target(all, sd, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9)dnl
target(all, vnd, 0, 1, 2, 3)dnl
-target(all, ccd, 0, 1, 2, 3)dnl
target(all, ttyC, 0, 1)dnl
target(all, bthub, 0, 1, 2)dnl
diff --git a/etc/etc.sgi/MAKEDEV.md b/etc/etc.sgi/MAKEDEV.md
index 93bfbdce221..c62232d4ae4 100644
--- a/etc/etc.sgi/MAKEDEV.md
+++ b/etc/etc.sgi/MAKEDEV.md
@@ -1,6 +1,6 @@
define(MACHINE,sgi)dnl
vers(__file__,
- {-$OpenBSD: MAKEDEV.md,v 1.33 2010/11/19 20:55:48 miod Exp $-},
+ {-$OpenBSD: MAKEDEV.md,v 1.34 2011/10/06 20:49:27 deraadt Exp $-},
etc.MACHINE)dnl
dnl
dnl Copyright (c) 2001-2006 Todd T. Fries <todd@OpenBSD.org>
@@ -32,7 +32,6 @@ _DEV(ramd)
_DEV(std)
_DEV(local)
_TITLE(dis)
-_DEV(ccd, 23, 6)
_DEV(cd, 8, 3)
_DEV(rd, 22, 8)
_DEV(sd, 9, 0)
@@ -104,7 +103,6 @@ target(all, rd, 0)dnl
target(all, cd, 0, 1)dnl
target(all, sd, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9)dnl
target(all, vnd, 0, 1, 2, 3)dnl
-target(all, ccd, 0, 1, 2, 3)dnl
twrget(wscons, wscons, ttyD, cfg, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, a, b)dnl
twrget(wscons, wscons, ttyE, cfg, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, a, b)dnl
twrget(wscons, wscons, ttyF, cfg, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, a, b)dnl
diff --git a/etc/etc.socppc/MAKEDEV.md b/etc/etc.socppc/MAKEDEV.md
index cd0031b8eb3..71e61e9cf04 100644
--- a/etc/etc.socppc/MAKEDEV.md
+++ b/etc/etc.socppc/MAKEDEV.md
@@ -1,6 +1,6 @@
define(MACHINE,socppc)dnl
vers(__file__,
- {-$OpenBSD: MAKEDEV.md,v 1.14 2011/07/29 17:54:09 kettenis Exp $-},
+ {-$OpenBSD: MAKEDEV.md,v 1.15 2011/10/06 20:49:27 deraadt Exp $-},
etc.MACHINE)dnl
dnl
dnl Copyright (c) 2001-2006 Todd T. Fries <todd@OpenBSD.org>
@@ -25,7 +25,6 @@ _DEV(ramd)
_DEV(std)
_DEV(local)
_TITLE(dis)
-_DEV(ccd, 18, 16)
_DEV(cd, 9, 3)
_DEV(raid, 54, 19)
_DEV(rd, 17, 17)
@@ -103,7 +102,6 @@ target(all, rd, 0)dnl
target(all, cd, 0, 1)dnl
target(all, sd, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9)dnl
target(all, vnd, 0, 1, 2, 3)dnl
-target(all, ccd, 0, 1, 2, 3)dnl
dnl target(all, gpio, 0, 1, 2)dnl
dnl target(all, bio)dnl
target(all, bthub, 0, 1, 2)dnl
diff --git a/etc/etc.sparc/MAKEDEV.md b/etc/etc.sparc/MAKEDEV.md
index 1926ce4d3ce..5fc06a8f7e9 100644
--- a/etc/etc.sparc/MAKEDEV.md
+++ b/etc/etc.sparc/MAKEDEV.md
@@ -1,6 +1,6 @@
define(MACHINE,sparc)dnl
vers(__file__,
- {-$OpenBSD: MAKEDEV.md,v 1.46 2010/11/19 20:55:48 miod Exp $-},
+ {-$OpenBSD: MAKEDEV.md,v 1.47 2011/10/06 20:49:27 deraadt Exp $-},
etc.MACHINE)dnl
dnl
dnl Copyright (c) 2001-2006 Todd T. Fries <todd@OpenBSD.org>
@@ -57,7 +57,6 @@ _DEV(ramdisk)
_DEV(std)
_DEV(local)
_TITLE(dis)
-_DEV(ccd, 23, 9)
_DEV(cd, 58, 18)
_DEV(flo, 54, 16)
_DEV(presto, 25, 26)
@@ -141,7 +140,6 @@ target(all, rd, 0)dnl
target(all, cd, 0, 1)dnl
target(all, sd, 0, 1, 2, 3, 4)dnl
target(all, vnd, 0, 1, 2, 3)dnl
-target(all, ccd, 0, 1, 2, 3)dnl
target(all, bpp, 0)dnl
target(all, presto, 0)dnl
twrget(wscons, wscons, ttyD, cfg, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, a, b)dnl
diff --git a/etc/etc.sparc64/MAKEDEV.md b/etc/etc.sparc64/MAKEDEV.md
index d921ffcc96a..a8ad83e8ea4 100644
--- a/etc/etc.sparc64/MAKEDEV.md
+++ b/etc/etc.sparc64/MAKEDEV.md
@@ -1,6 +1,6 @@
define(MACHINE,sparc64)dnl
vers(__file__,
- {-$OpenBSD: MAKEDEV.md,v 1.62 2010/10/08 18:21:34 ratchov Exp $-},
+ {-$OpenBSD: MAKEDEV.md,v 1.63 2011/10/06 20:49:27 deraadt Exp $-},
etc.MACHINE)dnl
dnl
dnl Copyright (c) 2001-2006 Todd T. Fries <todd@OpenBSD.org>
@@ -52,7 +52,6 @@ _DEV(ramdisk)
_DEV(std)
_DEV(local)
_TITLE(dis)
-_DEV(ccd, 23, 9)
_DEV(cd, 58, 18)
_DEV(flo, 54, 16)
_DEV(raid, 121, 25)
@@ -143,7 +142,6 @@ twrget(wscons, wscons, ttyG, cfg, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, a, b)dnl
twrget(wscons, wscons, ttyH, cfg, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, a, b)dnl
twrget(wscons, wscons, ttyI, cfg, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, a, b)dnl
twrget(wscons, wscons, ttyJ, cfg, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, a, b)dnl
-target(all, ccd, 0, 1, 2, 3)dnl
target(all, ch, 0)dnl
target(all, nnpfs, 0)dnl
target(all, vscsi, 0)dnl
diff --git a/etc/etc.vax/MAKEDEV.md b/etc/etc.vax/MAKEDEV.md
index d59063bd952..bf13032cdba 100644
--- a/etc/etc.vax/MAKEDEV.md
+++ b/etc/etc.vax/MAKEDEV.md
@@ -1,6 +1,6 @@
define(MACHINE,vax)dnl
vers(__file__,
- {-$OpenBSD: MAKEDEV.md,v 1.45 2011/09/03 20:45:17 miod Exp $-},
+ {-$OpenBSD: MAKEDEV.md,v 1.46 2011/10/06 20:49:27 deraadt Exp $-},
etc.MACHINE)dnl
dnl
dnl Copyright (c) 2001-2006 Todd T. Fries <todd@OpenBSD.org>
@@ -89,7 +89,6 @@ _DEV(ramdisk)
_DEV(std)
_DEV(local)
_TITLE(dis)
-_DEV(ccd, 54, 17)
_DEV(cd, 61, 22)
_DEV(hd, 58, 19)
_DEV(ra, 9, 9)
@@ -189,11 +188,10 @@ dnl target(all, rd, 0)dnl
target(all, cd, 0)dnl
target(all, sd, 0, 1, 2, 3)dnl
target(all, vnd, 0)dnl
-target( all, ccd, 0)dnl
-target( all, hd, 0, 1, 2)dnl
-target( all, mt, 0, 1)dnl
-target( all, st, 0, 1)dnl
-target( all, dhu, 0)dnl
-target( all, dz, 0)dnl
-target( all, dl, 0)dnl
-target( all, qsc, 0)dnl
+target(all, hd, 0, 1, 2)dnl
+target(all, mt, 0, 1)dnl
+target(all, st, 0, 1)dnl
+target(all, dhu, 0)dnl
+target(all, dz, 0)dnl
+target(all, dl, 0)dnl
+target(all, qsc, 0)dnl
diff --git a/etc/etc.zaurus/MAKEDEV.md b/etc/etc.zaurus/MAKEDEV.md
index ccba9bb22c6..6b4c228970a 100644
--- a/etc/etc.zaurus/MAKEDEV.md
+++ b/etc/etc.zaurus/MAKEDEV.md
@@ -1,6 +1,6 @@
define(MACHINE,zaurus)dnl
vers(__file__,
- {-$OpenBSD: MAKEDEV.md,v 1.28 2010/09/30 15:27:54 claudio Exp $-},
+ {-$OpenBSD: MAKEDEV.md,v 1.29 2011/10/06 20:49:27 deraadt Exp $-},
etc.MACHINE)dnl
dnl
dnl Copyright (c) 2001-2004 Todd T. Fries <todd@OpenBSD.org>
@@ -33,7 +33,6 @@ _DEV(ramdisk)
_DEV(std)
_DEV(local)
_TITLE(dis)
-_DEV(ccd, 21, 21)
_DEV(cd, 26, 26)
_DEV(ch, 27)
_DEV(raid, 71, 71)
@@ -119,6 +118,5 @@ target(all, rd, 0)dnl
target(all, cd, 0, 1)dnl
target(all, sd, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9)dnl
target(all, vnd, 0, 1, 2, 3)dnl
-target(all, ccd, 0, 1, 2, 3)dnl
target(all, ttyC, 0, 1)dnl
target(all, bthub, 0, 1, 2)dnl
diff --git a/etc/rc b/etc/rc
index 61a580a89e9..0a4ea56d4e5 100644
--- a/etc/rc
+++ b/etc/rc
@@ -1,4 +1,4 @@
-# $OpenBSD: rc,v 1.393 2011/09/16 10:11:20 robert Exp $
+# $OpenBSD: rc,v 1.394 2011/10/06 20:49:25 deraadt Exp $
# System startup script run by init on autoboot
# or after single-user.
@@ -259,11 +259,6 @@ if [ X"$1" = X"shutdown" ]; then
exit 0
fi
-# Configure ccd devices.
-if [ -f /etc/ccd.conf ]; then
- ccdconfig -C
-fi
-
# Configure raid devices.
for dev in 0 1 2 3; do
if [ -f /etc/raid$dev.conf ]; then
diff --git a/sbin/Makefile b/sbin/Makefile
index b7a0f2e3717..64fe1169aba 100644
--- a/sbin/Makefile
+++ b/sbin/Makefile
@@ -1,6 +1,6 @@
-# $OpenBSD: Makefile,v 1.94 2011/04/05 18:51:25 thib Exp $
+# $OpenBSD: Makefile,v 1.95 2011/10/06 20:49:28 deraadt Exp $
-SUBDIR= atactl badsect bioctl ccdconfig clri dhclient \
+SUBDIR= atactl badsect bioctl clri dhclient \
disklabel dmesg dump dumpfs fdisk fsck fsck_ext2fs fsck_ffs \
fsck_msdos fsdb fsirand growfs ifconfig iked init iopctl ipsecctl \
isakmpd kbd ldattach lmccontrol mknod modload modunload mount \
diff --git a/sbin/ccdconfig/Makefile b/sbin/ccdconfig/Makefile
deleted file mode 100644
index c9d93f74fa3..00000000000
--- a/sbin/ccdconfig/Makefile
+++ /dev/null
@@ -1,13 +0,0 @@
-# $OpenBSD: Makefile,v 1.6 2003/06/10 16:41:28 deraadt Exp $
-
-PROG= ccdconfig
-MAN= ccdconfig.8
-
-# Only permit root to use -g
-#BINGRP= kmem
-#BINMODE=2555
-
-DPADD= ${LIBKVM} ${LIBUTIL}
-LDADD= -lkvm -lutil
-
-.include <bsd.prog.mk>
diff --git a/sbin/ccdconfig/ccdconfig.8 b/sbin/ccdconfig/ccdconfig.8
deleted file mode 100644
index ab3fe1f015a..00000000000
--- a/sbin/ccdconfig/ccdconfig.8
+++ /dev/null
@@ -1,133 +0,0 @@
-.\" $OpenBSD: ccdconfig.8,v 1.24 2008/06/26 05:42:06 ray Exp $
-.\" $NetBSD: ccdconfig.8,v 1.4 1996/02/28 01:01:17 thorpej Exp $
-.\"
-.\" Copyright (c) 1996 The NetBSD Foundation, Inc.
-.\" All rights reserved.
-.\"
-.\" This code is derived from software contributed to The NetBSD Foundation
-.\" by Jason R. Thorpe.
-.\"
-.\" 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.
-.\"
-.\" 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.
-.\"
-.Dd $Mdocdate: June 26 2008 $
-.Dt CCDCONFIG 8
-.Os
-.Sh NAME
-.Nm ccdconfig
-.Nd configuration utility for the concatenated disk driver
-.Sh SYNOPSIS
-.Nm ccdconfig
-.Op Fl cv
-.Ar ccd
-.Ar ileave
-.Op Ar flags
-.Ar dev ...
-.Nm ccdconfig
-.Fl C
-.Op Fl v
-.Op Fl f Ar config_file
-.Nm ccdconfig
-.Fl u
-.Op Fl v
-.Ar ccd ...
-.Nm ccdconfig
-.Fl U
-.Op Fl v
-.Op Fl f Ar config_file
-.Sh DESCRIPTION
-.Nm
-is used to dynamically configure and unconfigure concatenated disk
-devices, or ccds.
-For more information about the ccd, see
-.Xr ccd 4 .
-.Pp
-The options are as follows:
-.Bl -tag -width Ds
-.It Fl C
-Configure all ccd devices listed in the ccd configuration file.
-.It Fl c
-Configure a ccd.
-This is the default behavior of
-.Nm ccdconfig .
-.It Fl f Ar config_file
-When configuring or unconfiguring all devices, read the file
-.Pa config_file
-instead of the default
-.Pa /etc/ccd.conf .
-.It Fl U
-Unconfigure all ccd devices listed in the ccd configuration file.
-.It Fl u
-Unconfigure a ccd.
-.It Fl v
-Causes
-.Nm
-to be verbose.
-.El
-.Pp
-A ccd is described on the command line and in the ccd configuration
-file by the name of the ccd, the interleave factor, the ccd configuration
-flags, and a list of one or more devices.
-The flags may be represented
-as a decimal number, a hexadecimal number, a comma-separated list
-of strings, or the word
-.Dq none .
-The flags are as follows:
-.Bd -unfilled -offset indent
-CCDF_SWAP 0x01 Interleave should be dmmax.
-CCDF_UNIFORM 0x02 Use uniform interleave.
-CCDF_MIRROR 0x04 Enable data mirroring.
-.Ed
-.Pp
-The format in the
-configuration file appears exactly as if it were entered on the command line.
-Note that on the command line and in the configuration file, the
-.Ar flags
-argument is optional.
-.Bd -unfilled -offset indent
-#
-# /etc/ccd.conf
-# Configuration file for concatenated disk devices
-#
-.Pp
-# ccd ileave flags component devices
-ccd0 16 none /dev/sd2e /dev/sd3e
-.Ed
-.Sh FILES
-.Bl -tag -width /etc/ccd.conf -compact
-.It Pa /etc/ccd.conf
-default ccd configuration file
-.El
-.Sh EXAMPLES
-The following command, executed from the command line, would configure ccd0
-with 4 components (/dev/sd2e, /dev/sd3e, /dev/sd4e, /dev/sd5e), and an
-interleave factor of 32 blocks.
-.Bd -unfilled -offset indent
-# ccdconfig ccd0 32 0 /dev/sd2e /dev/sd3e /dev/sd4e /dev/sd5e
-.Ed
-.Sh SEE ALSO
-.Xr ccd 4 ,
-.Xr rc 8
-.Sh HISTORY
-The
-.Nm
-command first appeared in
-.Nx 1.0a .
diff --git a/sbin/ccdconfig/ccdconfig.c b/sbin/ccdconfig/ccdconfig.c
deleted file mode 100644
index 27c2438cad2..00000000000
--- a/sbin/ccdconfig/ccdconfig.c
+++ /dev/null
@@ -1,724 +0,0 @@
-/* $OpenBSD: ccdconfig.c,v 1.36 2010/08/24 07:43:33 jasper Exp $ */
-/* $NetBSD: ccdconfig.c,v 1.6 1996/05/16 07:11:18 thorpej Exp $ */
-
-/*-
- * Copyright (c) 1996 The NetBSD Foundation, Inc.
- * All rights reserved.
- *
- * This code is derived from software contributed to The NetBSD Foundation
- * by Jason R. Thorpe.
- *
- * 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.
- *
- * 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/ioctl.h>
-#include <sys/disklabel.h>
-#include <sys/device.h>
-#include <sys/disk.h>
-#include <sys/stat.h>
-#include <sys/sysctl.h>
-#include <ctype.h>
-#include <err.h>
-#include <errno.h>
-#include <fcntl.h>
-#include <limits.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <unistd.h>
-#include <util.h>
-
-#ifndef SMALL
-/* this kvm nonsense doesn't belong here */
-#define SMALL
-#endif
-
-#ifndef SMALL
-#include <kvm.h>
-#include <nlist.h>
-#endif
-
-#include <dev/ccdvar.h>
-
-#include "pathnames.h"
-
-extern char *__progname;
-
-static int lineno = 0;
-static int verbose = 0;
-static char *ccdconf = _PATH_CCDCONF;
-
-static char *core = NULL;
-static char *kernel = NULL;
-
-struct flagval {
- char *fv_flag;
- int fv_val;
-} flagvaltab[] = {
- { "CCDF_SWAP", CCDF_SWAP },
- { "CCDF_UNIFORM", CCDF_UNIFORM },
- { "CCDF_MIRROR", CCDF_MIRROR },
- { "CCDF_OLD", CCDF_OLD },
- { NULL, 0 },
-};
-
-#ifndef SMALL
-static struct nlist nl[] = {
- { "_ccd_softc" },
-#define SYM_CCDSOFTC 0
- { "_numccd" },
-#define SYM_NUMCCD 1
- { NULL },
-};
-#endif
-
-#define CCD_CONFIG 0 /* configure a device */
-#define CCD_CONFIGALL 1 /* configure all devices */
-#define CCD_UNCONFIG 2 /* unconfigure a device */
-#define CCD_UNCONFIGALL 3 /* unconfigure all devices */
-#define CCD_DUMP 4 /* dump a ccd's configuration */
-
-static int checkdev(const char *);
-static int do_io(char *, u_long, struct ccd_ioctl *);
-static int do_single(int, char **, int);
-static int do_all(int);
-static int dump_ccd(int, char **);
-static int flags_to_val(char *);
-#ifndef SMALL
-static int pathtounit(const char *, int *);
-static void print_ccd_info(struct ccd_softc *, kvm_t *);
-#endif
-static char *resolve_ccdname(char *);
-static void usage(void);
-
-int
-main(int argc, char *argv[])
-{
- int ch, options = 0, action = CCD_CONFIG;
- gid_t gid;
-
- while ((ch = getopt(argc, argv, "cCf:gM:N:uUv")) != -1) {
- switch (ch) {
- case 'c':
- action = CCD_CONFIG;
- ++options;
- break;
-
- case 'C':
- action = CCD_CONFIGALL;
- ++options;
- break;
-
- case 'f':
- ccdconf = optarg;
- break;
-
- case 'g':
- action = CCD_DUMP;
- break;
-
- case 'M':
- core = optarg;
- break;
-
- case 'N':
- kernel = optarg;
- break;
-
- case 'u':
- action = CCD_UNCONFIG;
- ++options;
- break;
-
- case 'U':
- action = CCD_UNCONFIGALL;
- ++options;
- break;
-
- case 'v':
- verbose = 1;
- break;
-
- default:
- usage();
- }
- }
- argc -= optind;
- argv += optind;
-
- if (options > 1)
- usage();
-
- /*
- * Discard setgid privileges if not the running kernel so that bad
- * guys can't print interesting stuff from kernel memory.
- */
- gid = getgid();
- if (core != NULL || kernel != NULL || action != CCD_DUMP)
- if (setresgid(gid, gid, gid) == -1)
- err(1, "setresgid");
-
- switch (action) {
- case CCD_CONFIG:
- case CCD_UNCONFIG:
- setegid(getgid());
- setgid(getgid());
- return (do_single(argc, argv, action));
-
- case CCD_CONFIGALL:
- case CCD_UNCONFIGALL:
- setegid(getgid());
- setgid(getgid());
- return (do_all(action));
-
- case CCD_DUMP:
- return (dump_ccd(argc, argv));
- }
- /* NOTREACHED */
-
- return (0);
-}
-
-static int
-do_single(int argc, char *argv[], int action)
-{
- struct ccd_ioctl ccio;
- char *ccd, *cp, *cp2, **disks = NULL;
- int noflags = 0, i, ileave, flags = 0, j, ret = 1;
-
- memset(&ccio, 0, sizeof(ccio));
-
- /*
- * If unconfiguring, all arguments are treated as ccds.
- */
- if (action == CCD_UNCONFIG || action == CCD_UNCONFIGALL) {
- for (i = 0; argc != 0; ) {
- cp = *argv++; --argc;
- if ((ccd = resolve_ccdname(cp)) == NULL) {
- warnx("invalid ccd name: %s", cp);
- i = 1;
- continue;
- }
- if (do_io(ccd, CCDIOCCLR, &ccio))
- i = 1;
- else {
- if (verbose)
- printf("%s unconfigured\n", cp);
- }
-
- free(ccd);
- }
- return (i);
- }
-
- /* Make sure there are enough arguments. */
- if (argc < 4) {
- if (argc == 3) {
- /* Assume that no flags are specified. */
- noflags = 1;
- } else {
- if (action == CCD_CONFIGALL) {
- warnx("%s: bad line: %d", ccdconf, lineno);
- return (1);
- } else
- usage();
- }
- }
-
- /* First argument is the ccd to configure. */
- cp = *argv++; --argc;
- if ((ccd = resolve_ccdname(cp)) == NULL) {
- warnx("invalid ccd name: %s", cp);
- return (1);
- }
-
- /* Next argument is the interleave factor. */
- cp = *argv++; --argc;
- errno = 0; /* to check for ERANGE */
- ileave = (int)strtol(cp, &cp2, 10);
- if ((errno == ERANGE) || (ileave < 0) || (*cp2 != '\0')) {
- warnx("invalid interleave factor: %s", cp);
- goto done;
- }
-
- if (noflags == 0) {
- /* Next argument is the ccd configuration flags. */
- cp = *argv++; --argc;
- if ((flags = flags_to_val(cp)) < 0) {
- warnx("invalid flags argument: %s", cp);
- goto done;
- }
- }
-
- /* Next is the list of disks to make the ccd from. */
- disks = calloc(argc, sizeof(char *));
- if (disks == NULL) {
- warnx("no memory to configure ccd");
- goto done;
- }
- for (i = 0; argc != 0; ) {
- cp = *argv++; --argc;
- if ((j = checkdev(cp)) == 0)
- disks[i++] = cp;
- else {
- warnx("%s: %s", cp, strerror(j));
- goto done;
- }
- }
-
- /* Fill in the ccio. */
- ccio.ccio_disks = disks;
- ccio.ccio_ndisks = i;
- ccio.ccio_ileave = ileave;
- ccio.ccio_flags = flags;
-
- if (do_io(ccd, CCDIOCSET, &ccio))
- goto done;
-
- if (verbose) {
- printf("ccd%d: %d components ", ccio.ccio_unit,
- ccio.ccio_ndisks);
- for (i = 0; i < ccio.ccio_ndisks; ++i) {
- if ((cp2 = strrchr(disks[i], '/')) != NULL)
- ++cp2;
- else
- cp2 = disks[i];
- printf("%c%s%c",
- i == 0 ? '(' : ' ', cp2,
- i == ccio.ccio_ndisks - 1 ? ')' : ',');
- }
- printf(", %ld blocks ", ccio.ccio_size);
- if (ccio.ccio_ileave != 0)
- printf("interleaved at %d blocks\n", ccio.ccio_ileave);
- else
- printf("concatenated\n");
- }
-
- ret = 0;
-
-done:
- free(disks);
- free(ccd);
- return (ret);
-}
-
-static int
-do_all(int action)
-{
- FILE *f;
- char line[_POSIX2_LINE_MAX];
- char *cp, **argv;
- int argc, rval = 0;
- gid_t egid;
- char **nargv;
-
- egid = getegid();
- setegid(getgid());
- if ((f = fopen(ccdconf, "r")) == NULL) {
- setegid(egid);
- warn("fopen: %s", ccdconf);
- return (1);
- }
- setegid(egid);
-
- while (fgets(line, sizeof(line), f) != NULL) {
- argc = 0;
- argv = NULL;
- ++lineno;
- if ((cp = strrchr(line, '\n')) != NULL)
- *cp = '\0';
-
- /* Break up the line and pass it's contents to do_single(). */
- if (line[0] == '\0')
- goto end_of_line;
- for (cp = line; (cp = strtok(cp, " \t")) != NULL; cp = NULL) {
- if (*cp == '#')
- break;
- if ((nargv = realloc(argv,
- sizeof(char *) * ++argc)) == NULL) {
- fclose(f);
- warnx("no memory to configure ccds");
- return (1);
- }
- argv = nargv;
- argv[argc - 1] = cp;
- /*
- * If our action is to unconfigure all, then pass
- * just the first token to do_single() and ignore
- * the rest. Since this will be encountered on
- * our first pass through the line, the Right
- * Thing will happen.
- */
- if (action == CCD_UNCONFIGALL) {
- if (do_single(argc, argv, action))
- rval = 1;
- goto end_of_line;
- }
- }
- if (argc != 0)
- if (do_single(argc, argv, action))
- rval = 1;
-
- end_of_line:
- if (argv != NULL)
- free(argv);
- }
-
- (void)fclose(f);
- return (rval);
-}
-
-static int
-checkdev(const char *path)
-{
- struct stat st;
-
- if (stat(path, &st) != 0)
- return (errno);
-
- if (!S_ISBLK(st.st_mode) && !S_ISCHR(st.st_mode))
- return (EINVAL);
-
- return (0);
-}
-
-#ifndef SMALL
-static int
-pathtounit(const char *path, int *unitp)
-{
- struct stat st;
- int maxpartitions;
-
- if (stat(path, &st) != 0)
- return (errno);
-
- if (!S_ISBLK(st.st_mode) && !S_ISCHR(st.st_mode))
- return (EINVAL);
-
- if ((maxpartitions = getmaxpartitions()) < 0)
- return (errno);
-
- *unitp = minor(st.st_rdev) / maxpartitions;
-
- return (0);
-}
-#endif
-
-static char *
-resolve_ccdname(char *name)
-{
- char c, *path;
- size_t len;
- int rawpart;
-
- if (name[0] == '/' || name[0] == '.') {
- /* Assume they gave the correct pathname. */
- return (strdup(name));
- }
-
- len = strlen(name);
- c = name[len - 1];
-
- if (isdigit(c)) {
- if ((rawpart = getrawpartition()) < 0)
- return (NULL);
- if (asprintf(&path, "/dev/%s%c", name, 'a' + rawpart) == -1)
- return (NULL);
- } else {
- if (asprintf(&path, "/dev/%s", name) == -1)
- return (NULL);
- }
-
- return (path);
-}
-
-static int
-do_io(char *path, u_long cmd, struct ccd_ioctl *cciop)
-{
- int fd;
- char *cp;
-
- if ((fd = open(path, O_RDWR, 0640)) < 0) {
- warn("open: %s", path);
- return (1);
- }
-
- if (ioctl(fd, cmd, cciop) < 0) {
- switch (cmd) {
- case CCDIOCSET:
- cp = "CCDIOCSET";
- break;
-
- case CCDIOCCLR:
- cp = "CCDIOCCLR";
- break;
-
- default:
- cp = "unknown";
- }
- warn("ioctl (%s): %s", cp, path);
- close(fd);
- return (1);
- }
-
- close(fd);
- return (0);
-}
-
-#ifdef SMALL
-static int
-dump_ccd(int argc, char *argv[])
-{
- warnx("option not supported");
- return (1);
-}
-#else
-#define KVM_ABORT(kd, str) { \
- (void)kvm_close((kd)); \
- warnx("%s", (str)); \
- warnx("%s", kvm_geterr((kd))); \
- return (1); \
-}
-
-static int
-dump_ccd(int argc, char *argv[])
-{
- char errbuf[_POSIX2_LINE_MAX], *ccd, *cp;
- struct ccd_softc *cs, *kcs;
- size_t readsize;
- int i, error, numccd, numconfiged = 0;
- kvm_t *kd;
-
- memset(errbuf, 0, sizeof(errbuf));
-
- if ((kd = kvm_openfiles(kernel, core, NULL, O_RDONLY,
- errbuf)) == NULL) {
- warnx("can't open kvm: %s", errbuf);
- return (1);
- }
-
- setegid(getgid());
- setgid(getgid());
-
- if (kvm_nlist(kd, nl))
- KVM_ABORT(kd, "ccd-related symbols not available");
-
- /* Check to see how many ccds are currently configured. */
- if (kvm_read(kd, nl[SYM_NUMCCD].n_value, (char *)&numccd,
- sizeof(numccd)) != sizeof(numccd))
- KVM_ABORT(kd, "can't determine number of configured ccds");
-
- if (numccd == 0) {
- printf("ccd driver in kernel, but is uninitialized\n");
- goto done;
- }
-
- /* Allocate space for the configuration data. */
- readsize = numccd * sizeof(struct ccd_softc);
- if ((cs = malloc(readsize)) == NULL) {
- warnx("no memory for configuration data");
- goto bad;
- }
- memset(cs, 0, readsize);
-
- /*
- * Read the ccd configuration data from the kernel and dump
- * it to stdout.
- */
- if (kvm_read(kd, nl[SYM_CCDSOFTC].n_value, (char *)&kcs,
- sizeof(kcs)) != sizeof(kcs)) {
- free(cs);
- KVM_ABORT(kd, "can't find pointer to configuration data");
- }
- if (kvm_read(kd, (u_long)kcs, (char *)cs, readsize) != readsize) {
- free(cs);
- KVM_ABORT(kd, "can't read configuration data");
- }
-
- if (argc == 0) {
- for (i = 0; i < numccd; ++i)
- if (cs[i].sc_flags & CCDF_INITED) {
- ++numconfiged;
- print_ccd_info(&cs[i], kd);
- }
-
- if (numconfiged == 0)
- printf("no concatenated disks configured\n");
- } else {
- while (argc) {
- cp = *argv++; --argc;
- if ((ccd = resolve_ccdname(cp)) == NULL) {
- warnx("invalid ccd name: %s", cp);
- continue;
- }
- if ((error = pathtounit(ccd, &i)) != 0) {
- warnx("%s: %s", ccd, strerror(error));
- free(ccd);
- continue;
- }
- free(ccd);
- if (i >= numccd) {
- warnx("ccd%d not configured", i);
- continue;
- }
- if (cs[i].sc_flags & CCDF_INITED)
- print_ccd_info(&cs[i], kd);
- else
- printf("ccd%d not configured\n", i);
- }
- }
-
- free(cs);
-
- done:
- (void)kvm_close(kd);
- return (0);
-
- bad:
- (void)kvm_close(kd);
- return (1);
-}
-
-static void
-print_ccd_info(struct ccd_softc *cs, kvm_t *kd)
-{
- static int header_printed = 0;
- struct ccdcinfo *cip;
- size_t readsize;
- char path[MAXPATHLEN];
- int i;
-
- if (header_printed == 0 && verbose) {
- printf("# ccd\t\tileave\tflags\tcomponent devices\n");
- header_printed = 1;
- }
-
- readsize = cs->sc_nccdisks * sizeof(struct ccdcinfo);
- if ((cip = malloc(readsize)) == NULL) {
- warn("%s: can't allocate memory for component info",
- cs->sc_xname);
- return;
- }
- memset(cip, 0, readsize);
-
- /* Dump out softc information. */
- printf("%s\t\t%d\t0x%x\t", cs->sc_xname, cs->sc_ileave,
- cs->sc_cflags & CCDF_USERMASK);
- fflush(stdout);
-
- /* Read in the component info. */
- if (kvm_read(kd, (u_long)cs->sc_cinfo, (char *)cip,
- readsize) != readsize) {
- printf("\n");
- warnx("can't read component info");
- warnx("%s", kvm_geterr(kd));
- goto done;
- }
-
- /* Read component pathname and display component info. */
- for (i = 0; i < cs->sc_nccdisks; ++i) {
- if (kvm_read(kd, (u_long)cip[i].ci_path, (char *)path,
- cip[i].ci_pathlen) != cip[i].ci_pathlen) {
- printf("\n");
- warnx("can't read component pathname");
- warnx("%s", kvm_geterr(kd));
- goto done;
- }
- printf((i + 1 < cs->sc_nccdisks) ? "%s " : "%s\n", path);
- fflush(stdout);
- }
-
- done:
- free(cip);
-}
-#endif /* !SMALL */
-
-static int
-flags_to_val(char *flags)
-{
- char *cp, *tok;
- int i, tmp, val = ~CCDF_USERMASK;
- size_t flagslen;
-
- /*
- * The most common case is that of NIL flags, so check for
- * those first.
- */
- if (strcmp("none", flags) == 0 || strcmp("0x0", flags) == 0 ||
- strcmp("0", flags) == 0)
- return (0);
-
- flagslen = strlen(flags);
-
- /* Check for values represented by strings. */
- if ((cp = strdup(flags)) == NULL)
- err(1, "no memory to parse flags");
- tmp = 0;
- for (tok = cp; (tok = strtok(tok, ",")) != NULL; tok = NULL) {
- for (i = 0; flagvaltab[i].fv_flag != NULL; ++i)
- if (strcmp(tok, flagvaltab[i].fv_flag) == 0)
- break;
- if (flagvaltab[i].fv_flag == NULL) {
- free(cp);
- goto bad_string;
- }
- tmp |= flagvaltab[i].fv_val;
- }
-
- /* If we get here, the string was ok. */
- free(cp);
- val = tmp;
- goto out;
-
- bad_string:
-
- /* Check for values represented in hex. */
- if (flagslen > 2 && flags[0] == '0' && flags[1] == 'x') {
- errno = 0; /* to check for ERANGE */
- val = (int)strtol(&flags[2], &cp, 16);
- if ((errno == ERANGE) || (*cp != '\0'))
- return (-1);
- goto out;
- }
-
- /* Check for values represented in decimal. */
- errno = 0; /* to check for ERANGE */
- val = (int)strtol(flags, &cp, 10);
- if ((errno == ERANGE) || (*cp != '\0'))
- return (-1);
-
- out:
- return (((val & ~CCDF_USERMASK) == 0) ? val : -1);
-}
-
-static void
-usage(void)
-{
-
- fprintf(stderr, "usage: %s [-cv] ccd ileave [flags] dev ...\n",
- __progname);
- fprintf(stderr, " %s -C [-v] [-f config_file]\n", __progname);
- fprintf(stderr, " %s -u [-v] ccd ...\n", __progname);
- fprintf(stderr, " %s -U [-v] [-f config_file]\n", __progname);
- exit(1);
-}
diff --git a/sbin/ccdconfig/pathnames.h b/sbin/ccdconfig/pathnames.h
deleted file mode 100644
index 11a8f77483d..00000000000
--- a/sbin/ccdconfig/pathnames.h
+++ /dev/null
@@ -1,33 +0,0 @@
-/* $OpenBSD: pathnames.h,v 1.3 2008/06/26 05:42:06 ray Exp $ */
-/* $NetBSD: pathnames.h,v 1.2 1996/02/28 01:01:20 thorpej Exp $ */
-
-/*-
- * Copyright (c) 1996 The NetBSD Foundation, Inc.
- * All rights reserved.
- *
- * This code is derived from software contributed to The NetBSD Foundation
- * by Jason R. Thorpe.
- *
- * 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.
- *
- * 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.
- */
-
-#define _PATH_CCDCONF "/etc/ccd.conf"
diff --git a/share/man/man4/Makefile b/share/man/man4/Makefile
index 70eee9b4262..f3ce3afd0ca 100644
--- a/share/man/man4/Makefile
+++ b/share/man/man4/Makefile
@@ -1,4 +1,4 @@
-# $OpenBSD: Makefile,v 1.529 2011/09/16 15:59:14 yuo Exp $
+# $OpenBSD: Makefile,v 1.530 2011/10/06 20:49:28 deraadt Exp $
MAN= aac.4 ac97.4 acphy.4 \
acpi.4 acpiac.4 acpiasus.4 acpibat.4 acpibtn.4 acpicpu.4 acpidock.4 \
@@ -15,7 +15,7 @@ MAN= aac.4 ac97.4 acphy.4 \
aue.4 auglx.4 auich.4 auixp.4 autri.4 auvia.4 axe.4 az.4 azalia.4 \
bce.4 berkwdt.4 bge.4 bha.4 bio.4 bktr.4 bluetooth.4 bmtphy.4 bnx.4 \
boca.4 bpf.4 brgphy.4 bridge.4 btkbd.4 btms.4 btsco.4 bwi.4 \
- cac.4 cas.4 cardbus.4 carp.4 ccd.4 cd.4 cdce.4 cdcef.4 che.4 cfxga.4 \
+ cac.4 cas.4 cardbus.4 carp.4 cd.4 cdce.4 cdcef.4 che.4 cfxga.4 \
ch.4 ciphy.4 ciss.4 clcs.4 clct.4 cmpci.4 cnw.4 \
com.4 crypto.4 cue.4 cy.4 cz.4 dc.4 dcphy.4 ddb.4 de.4 \
diskmap.4 divert.4 dpt.4 drm.4 \
diff --git a/share/man/man4/ccd.4 b/share/man/man4/ccd.4
deleted file mode 100644
index 453fc661f89..00000000000
--- a/share/man/man4/ccd.4
+++ /dev/null
@@ -1,148 +0,0 @@
-.\" $OpenBSD: ccd.4,v 1.23 2007/05/31 19:19:49 jmc Exp $
-.\" $NetBSD: ccd.4,v 1.5 1995/10/09 06:09:09 thorpej Exp $
-.\"
-.\" Copyright (c) 1994 Jason Downs.
-.\" Copyright (c) 1994, 1995 Jason R. Thorpe.
-.\" 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. All advertising materials mentioning features or use of this software
-.\" must display the following acknowledgement:
-.\" This product includes software developed for the NetBSD Project
-.\" by Jason Downs and Jason R. Thorpe.
-.\" 4. Neither the name of the author 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 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.
-.\"
-.Dd $Mdocdate: May 31 2007 $
-.Dt CCD 4
-.Os
-.Sh NAME
-.Nm ccd
-.Nd concatenated disk driver
-.Sh SYNOPSIS
-.Cd "pseudo-device ccd" Op Ar count
-.Sh DESCRIPTION
-The
-.Nm
-driver provides the capability of combining one or more disks/partitions
-into one virtual disk.
-.Pp
-Note that the
-.Sq raw
-partitions of the disks
-.Em should not
-be combined.
-Each component partition should be offset at least one
-cylinder from the beginning of the component disk.
-This avoids potential conflicts between the component disk's
-.Xr disklabel 8
-and the concatenated disk's disklabel.
-The kernel wants to only allow component partitions of type
-.Dv FS_CCD ,
-but due to disklabel restrictions on some architectures will also accept
-component partitions of
-.Dv FS_BSDFFS .
-.Pp
-In order to compile in support for
-.Nm ,
-make sure your kernel configuration file contains a line
-similar to the following (GENERIC does by default):
-.Bd -literal -offset indent
-pseudo-device ccd 4 # concatenated disk devices
-.Ed
-.Pp
-The optional
-.Ar count
-argument specifies how many
-concatenated disk devices are allocated for at boot time.
-In this example, no more than 4
-may be configured.
-.Pp
-A
-.Nm
-may be either serially concatenated, interleaved, or mirrored.
-To serially concatenate partitions, specify an interleave factor of 0.
-Mirroring configurations require an even number of components.
-.Pp
-If a
-.Nm
-is interleaved correctly, a
-.Dq striping
-effect is achieved, which can increase performance.
-Finding the optimum interleave factor is a hard problem.
-Some things to think about are the number of disks in the
-.Nm ,
-the typical read-ahead opportunities, the filesystem blocksize, and if
-it's possible to use the optimized
-.Nm
-I/O protocol.
-The optimized protocol allows smaller interleave factors for a
-comparably cheap price but requires that the factor be a multiple of the
-software page size
-.Pf ( Dv CLBYTES ) ,
-and that mirroring is not requested.
-So far the best policy is to test with different interleaves and
-benchmark typical uses.
-A rule of thumb might be to use the software pagesize with the optimized
-I/O protocol (the default, unless the requirements mentioned above are not
-fulfilled) or
-.Dv MAXBSIZE /
-#components with the unoptimized protocol.
-Since the interleave factor is expressed in units of
-.Dv DEV_BSIZE ,
-one must account for sector sizes other than
-.Dv DEV_BSIZE
-in order to calculate the correct interleave.
-The kernel will not allow an interleave factor less than the size
-of the largest component sector divided by
-.Dv DEV_BSIZE .
-.Pp
-Note that best performance is achieved if all component disks have the same
-geometry and size.
-Optimum striping cannot occur with different disk types.
-.Pp
-There is a run-time utility that is used for configuring concatenated disks.
-See
-.Xr ccdconfig 8
-for more information.
-.Sh FILES
-.Bl -tag -width tenletters+five -compact
-.It Pa /dev/{,r}ccd*
-ccd device special files
-.El
-.Sh SEE ALSO
-.Xr MAKEDEV 8 ,
-.Xr ccdconfig 8 ,
-.Xr disklabel 8 ,
-.Xr fsck 8 ,
-.Xr growfs 8 ,
-.Xr mount 8 ,
-.Xr newfs 8
-.Sh HISTORY
-The concatenated disk driver was originally written at the University of
-Utah.
-.Sh CAVEATS
-If just one (or more) of the disks in a
-non-redundant
-.Nm
-configuration fails, the entire file system will be lost.
diff --git a/sys/arch/alpha/alpha/conf.c b/sys/arch/alpha/alpha/conf.c
index 9c3d11cb594..35c539d719e 100644
--- a/sys/arch/alpha/alpha/conf.c
+++ b/sys/arch/alpha/alpha/conf.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: conf.c,v 1.66 2011/01/14 19:04:08 jasper Exp $ */
+/* $OpenBSD: conf.c,v 1.67 2011/10/06 20:49:27 deraadt Exp $ */
/* $NetBSD: conf.c,v 1.16 1996/10/18 21:26:57 cgd Exp $ */
/*-
@@ -52,7 +52,6 @@ bdev_decl(fd);
#include "uk.h"
#include "vnd.h"
#include "raid.h"
-#include "ccd.h"
#include "rd.h"
#include "bktr.h"
#include "radio.h"
@@ -66,7 +65,7 @@ struct bdevsw bdevsw[] =
bdev_disk_init(NFD,fd), /* 4: Floppy disk */
bdev_notdef(), /* 5 */
bdev_disk_init(NRD,rd), /* 6: ram disk driver */
- bdev_disk_init(NCCD,ccd), /* 7: concatenated disk driver */
+ bdev_notdef(), /* 7: was: concatenated disk driver */
bdev_disk_init(NSD,sd), /* 8: SCSI disk */
bdev_disk_init(NVND,vnd), /* 9: vnode disk driver */
bdev_lkm_dummy(), /* 10 */
@@ -168,7 +167,7 @@ struct cdevsw cdevsw[] =
cdev_audio_init(NAUDIO,audio), /* 24: generic audio I/O */
cdev_wsdisplay_init(NWSDISPLAY,wsdisplay), /* 25: workstation console */
cdev_tty_init(NCOM,com), /* 26: ns16550 UART */
- cdev_disk_init(NCCD,ccd), /* 27: concatenated disk driver */
+ cdev_notdef(), /* 27: was: concatenated disk driver */
cdev_disk_init(NRD,rd), /* 28: ram disk driver */
cdev_mouse_init(NWSKBD,wskbd), /* 29: /dev/kbd XXX */
cdev_mouse_init(NWSMOUSE,wsmouse), /* 30: /dev/mouse XXX */
@@ -290,7 +289,7 @@ int chrtoblktbl[] = {
/* 24 */ NODEV,
/* 25 */ NODEV,
/* 26 */ NODEV,
- /* 27 */ 7, /* ccd */
+ /* 27 */ NODEV,
/* 28 */ 6, /* rd */
/* 29 */ NODEV,
/* 30 */ NODEV,
diff --git a/sys/arch/alpha/conf/files.alpha b/sys/arch/alpha/conf/files.alpha
index 14f80dc1555..73c31a39268 100644
--- a/sys/arch/alpha/conf/files.alpha
+++ b/sys/arch/alpha/conf/files.alpha
@@ -1,4 +1,4 @@
-# $OpenBSD: files.alpha,v 1.91 2010/12/06 20:10:17 jasper Exp $
+# $OpenBSD: files.alpha,v 1.92 2011/10/06 20:49:28 deraadt Exp $
# $NetBSD: files.alpha,v 1.32 1996/11/25 04:03:21 cgd Exp $
#
# alpha-specific configuration info
@@ -29,7 +29,6 @@ device cpu {} # not really optional
attach cpu at mainbus
file arch/alpha/alpha/cpu.c cpu
-major {ccd = 7}
major {vnd = 9}
#
diff --git a/sys/arch/amd64/amd64/conf.c b/sys/arch/amd64/amd64/conf.c
index 5fb1bb1ea89..bda6fd125fa 100644
--- a/sys/arch/amd64/amd64/conf.c
+++ b/sys/arch/amd64/amd64/conf.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: conf.c,v 1.35 2011/07/04 22:53:53 tedu Exp $ */
+/* $OpenBSD: conf.c,v 1.36 2011/10/06 20:49:27 deraadt Exp $ */
/*
* Copyright (c) 1994, 1995 Charles M. Hannum. All rights reserved.
@@ -52,7 +52,6 @@ bdev_decl(fd);
#include "cd.h"
#include "uk.h"
#include "vnd.h"
-#include "ccd.h"
#include "raid.h"
#include "rd.h"
@@ -73,8 +72,8 @@ struct bdevsw bdevsw[] =
bdev_lkm_dummy(), /* 12 */
bdev_lkm_dummy(), /* 13 */
bdev_disk_init(NVND,vnd), /* 14: vnode disk driver */
- bdev_lkm_dummy(), /* 15: Sony CD-ROM */
- bdev_disk_init(NCCD,ccd), /* 16: concatenated disk driver */
+ bdev_notdef(), /* 15: was: Sony CD-ROM */
+ bdev_notdef(), /* 16: was: concatenated disk driver */
bdev_disk_init(NRD,rd), /* 17: ram disk driver */
bdev_lkm_dummy(), /* 18 */
bdev_disk_init(NRAID,raid), /* 19: RAIDframe disk driver */
@@ -209,7 +208,7 @@ struct cdevsw cdevsw[] =
cdev_disk_init(NCD,cd), /* 15: SCSI CD-ROM */
cdev_lpt_init(NLPT,lpt), /* 16: parallel printer */
cdev_ch_init(NCH,ch), /* 17: SCSI autochanger */
- cdev_disk_init(NCCD,ccd), /* 18: concatenated disk driver */
+ cdev_notdef(), /* 18: was: concatenated disk driver */
cdev_notdef(), /* 19 */
cdev_uk_init(NUK,uk), /* 20: unknown SCSI */
cdev_notdef(), /* 21 */
@@ -361,7 +360,7 @@ int chrtoblktbl[] = {
/* 15 */ 6, /* cd */
/* 16 */ NODEV,
/* 17 */ NODEV,
- /* 18 */ 16, /* ccd */
+ /* 18 */ NODEV,
/* 19 */ NODEV,
/* 20 */ NODEV,
/* 21 */ NODEV,
diff --git a/sys/arch/amd64/conf/RAMDISK b/sys/arch/amd64/conf/RAMDISK
index 03f6accc6d6..994ed65a100 100644
--- a/sys/arch/amd64/conf/RAMDISK
+++ b/sys/arch/amd64/conf/RAMDISK
@@ -1,4 +1,4 @@
-# $OpenBSD: RAMDISK,v 1.53 2011/10/04 15:44:17 deraadt Exp $
+# $OpenBSD: RAMDISK,v 1.54 2011/10/06 20:49:28 deraadt Exp $
machine amd64 # architecture, used by config; REQUIRED
@@ -248,5 +248,4 @@ pseudo-device loop 1 # network loopback
#pseudo-device ppp 1 # PPP
pseudo-device bpfilter 1 # packet filter
pseudo-device rd 1 # ramdisk
-#pseudo-device ccd 4 # concatenated disk devices
pseudo-device wsmux 2
diff --git a/sys/arch/amd64/conf/RAMDISK_CD b/sys/arch/amd64/conf/RAMDISK_CD
index cab8eba6789..39ead6e2a6e 100644
--- a/sys/arch/amd64/conf/RAMDISK_CD
+++ b/sys/arch/amd64/conf/RAMDISK_CD
@@ -1,4 +1,4 @@
-# $OpenBSD: RAMDISK_CD,v 1.119 2011/06/29 20:52:08 matthew Exp $
+# $OpenBSD: RAMDISK_CD,v 1.120 2011/10/06 20:49:28 deraadt Exp $
machine amd64 # architecture, used by config; REQUIRED
@@ -333,6 +333,5 @@ pseudo-device loop 1 # network loopback
pseudo-device vlan # IEEE 802.1Q VLAN
pseudo-device bpfilter 1 # packet filter
pseudo-device rd 1 # ramdisk
-pseudo-device ccd 4 # concatenated disk devices
pseudo-device wsmux 2
pseudo-device bio 1 # ioctl multiplexing device
diff --git a/sys/arch/amd64/conf/files.amd64 b/sys/arch/amd64/conf/files.amd64
index 6123bb48730..91b6a289992 100644
--- a/sys/arch/amd64/conf/files.amd64
+++ b/sys/arch/amd64/conf/files.amd64
@@ -1,4 +1,4 @@
-# $OpenBSD: files.amd64,v 1.63 2011/07/07 02:57:24 deraadt Exp $
+# $OpenBSD: files.amd64,v 1.64 2011/10/06 20:49:28 deraadt Exp $
maxpartitions 16
maxusers 2 16 128
@@ -250,7 +250,6 @@ attach vmt at mainbus
# device major numbers
#
-major {ccd = 16}
major {vnd = 14}
major {sd = 4}
major {st = 5}
diff --git a/sys/arch/arm/arm/conf.c b/sys/arch/arm/arm/conf.c
index 5f098ff9f03..4998ea731dc 100644
--- a/sys/arch/arm/arm/conf.c
+++ b/sys/arch/arm/arm/conf.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: conf.c,v 1.30 2011/09/16 21:01:45 miod Exp $ */
+/* $OpenBSD: conf.c,v 1.31 2011/10/06 20:49:27 deraadt Exp $ */
/* $NetBSD: conf.c,v 1.10 2002/04/19 01:04:38 wiz Exp $ */
/*
@@ -87,7 +87,6 @@
/*
* Disk/Filesystem pseudo-devices
*/
-#include "ccd.h" /* concatenated disk driver */
#include "rd.h" /* memory disk driver */
#include "raid.h" /* RAIDframe */
#include "vnd.h" /* vnode disk driver */
@@ -181,7 +180,7 @@ struct bdevsw bdevsw[] = {
bdev_disk_init(NRD,rd), /* 18: memory disk */
bdev_disk_init(NVND,vnd), /* 19: vnode disk driver */
bdev_lkm_dummy(), /* 20: */
- bdev_disk_init(NCCD,ccd), /* 21: concatenated disk driver */
+ bdev_notdef(), /* 21: was: concatenated disk driver */
bdev_lkm_dummy(), /* 22: */
bdev_lkm_dummy(), /* 23: */
bdev_disk_init(NSD,sd), /* 24: SCSI disk */
@@ -309,7 +308,7 @@ struct cdevsw cdevsw[] = {
cdev_disk_init(NRD,rd), /* 18: ram disk driver */
cdev_disk_init(NVND,vnd), /* 19: vnode disk driver */
cdev_lkm_dummy(), /* 20: */
- cdev_disk_init(NCCD,ccd), /* 21: concatenated disk driver */
+ cdev_notdef(), /* 21: was: concatenated disk driver */
cdev_bpf_init(NBPFILTER,bpf), /* 22: Berkeley packet filter */
cdev_lkm_dummy(), /* 23: */
cdev_disk_init(NSD,sd), /* 24: SCSI disk */
@@ -463,7 +462,7 @@ int chrtoblktbl[] = {
/* 18 */ 18, /* rd */
/* 19 */ 19, /* vnd */
/* 20 */ NODEV,
- /* 21 */ 21, /* ccd */
+ /* 21 */ NODEV,
/* 22 */ NODEV,
/* 23 */ NODEV,
/* 24 */ 24, /* sd */
diff --git a/sys/arch/aviion/aviion/conf.c b/sys/arch/aviion/aviion/conf.c
index 170afc4c748..bb3839a9679 100644
--- a/sys/arch/aviion/aviion/conf.c
+++ b/sys/arch/aviion/aviion/conf.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: conf.c,v 1.14 2011/01/14 19:04:08 jasper Exp $ */
+/* $OpenBSD: conf.c,v 1.15 2011/10/06 20:49:27 deraadt Exp $ */
/*-
* Copyright (c) 1991 The Regents of the University of California.
@@ -41,7 +41,6 @@
#include <machine/conf.h>
#include "bpfilter.h"
-#include "ccd.h"
#include "cd.h"
#include "ch.h"
#include "dart.h"
@@ -76,7 +75,7 @@ struct bdevsw bdevsw[] =
bdev_disk_init(NCD,cd), /* 6: SCSI CD-ROM */
bdev_disk_init(NRD,rd), /* 7: ramdisk */
bdev_disk_init(NVND,vnd), /* 8: vnode disk driver */
- bdev_disk_init(NCCD,ccd), /* 9: concatenated disk driver */
+ bdev_notdef(), /* 9: was: concatenated disk driver */
bdev_notdef(), /* 10 */
bdev_notdef(), /* 11 */
bdev_notdef(), /* 12 */
@@ -108,7 +107,7 @@ struct cdevsw cdevsw[] =
cdev_notdef(), /* 14 */
cdev_notdef(), /* 15 */
cdev_notdef(), /* 16 */
- cdev_disk_init(NCCD,ccd), /* 17: concatenated disk */
+ cdev_notdef(), /* 17: was: concatenated disk */
cdev_disk_init(NRD,rd), /* 18: ramdisk disk */
cdev_disk_init(NVND,vnd), /* 19: vnode disk */
cdev_tape_init(NST,st), /* 20: SCSI tape */
@@ -215,7 +214,7 @@ int chrtoblktbl[] = {
/* 14 */ NODEV,
/* 15 */ NODEV,
/* 16 */ NODEV,
- /* 17 */ 9, /* ccd */
+ /* 17 */ NODEV,
/* 18 */ 7, /* rd */
/* 19 */ 8, /* vnd */
/* 20 */ 5, /* st */
diff --git a/sys/arch/hp300/hp300/conf.c b/sys/arch/hp300/hp300/conf.c
index c9e4911c160..396fe62449a 100644
--- a/sys/arch/hp300/hp300/conf.c
+++ b/sys/arch/hp300/hp300/conf.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: conf.c,v 1.51 2011/01/14 19:04:08 jasper Exp $ */
+/* $OpenBSD: conf.c,v 1.52 2011/10/06 20:49:27 deraadt Exp $ */
/* $NetBSD: conf.c,v 1.39 1997/05/12 08:17:53 thorpej Exp $ */
/*-
@@ -40,7 +40,6 @@
#include <sys/conf.h>
#include <sys/vnode.h>
-#include "ccd.h"
#include "cd.h"
#include "ch.h"
#include "ct.h"
@@ -62,7 +61,7 @@ struct bdevsw bdevsw[] =
bdev_disk_init(NHD,hd), /* 2: HPIB disk */
bdev_swap_init(1,sw), /* 3: swap pseudo-device */
bdev_disk_init(NSD,sd), /* 4: SCSI disk */
- bdev_disk_init(NCCD,ccd), /* 5: concatenated disk driver */
+ bdev_notdef(), /* 5: was: concatenated disk driver */
bdev_disk_init(NVND,vnd), /* 6: vnode disk driver */
bdev_tape_init(NST,st), /* 7: SCSI tape */
bdev_disk_init(NRD,rd), /* 8: RAM disk */
@@ -135,7 +134,7 @@ struct cdevsw cdevsw[] =
cdev_notdef(), /* 14: was human interface loop */
cdev_tty_init(NDCM,dcm), /* 15: 4-port serial */
cdev_tape_init(NMT,mt), /* 16: magnetic reel tape */
- cdev_disk_init(NCCD,ccd), /* 17: concatenated disk */
+ cdev_notdef(), /* 17: was: concatenated disk */
cdev_disk_init(NCD,cd), /* 18: SCSI CD-ROM */
cdev_disk_init(NVND,vnd), /* 19: vnode disk driver */
cdev_tape_init(NST,st), /* 20: SCSI tape */
@@ -243,7 +242,7 @@ int chrtoblktbl[] = {
/* 14 */ NODEV,
/* 15 */ NODEV,
/* 16 */ 1, /* mt */
- /* 17 */ 5, /* ccd */
+ /* 17 */ NODEV,
/* 18 */ 9, /* cd */
/* 19 */ 6, /* vnd */
/* 20 */ 7, /* st */
diff --git a/sys/arch/hppa/conf/RAMDISK b/sys/arch/hppa/conf/RAMDISK
index 5fe1e7f052f..d6dbce87fdd 100644
--- a/sys/arch/hppa/conf/RAMDISK
+++ b/sys/arch/hppa/conf/RAMDISK
@@ -1,4 +1,4 @@
-# $OpenBSD: RAMDISK,v 1.93 2011/06/29 20:52:09 matthew Exp $
+# $OpenBSD: RAMDISK,v 1.94 2011/10/06 20:49:28 deraadt Exp $
#
# Diskless kernel config
#
@@ -330,6 +330,5 @@ pseudo-device loop 1 # network loopback
pseudo-device bpfilter 1 # packet filter
pseudo-device vlan # IEEE 802.1Q VLAN
pseudo-device ksyms 1 # kernel symbols device
-#pseudo-device ccd 4 # concatenated disk devices
pseudo-device wsmux 2
pseudo-device bio 1 # ioctl multiplexing device
diff --git a/sys/arch/hppa/conf/files.hppa b/sys/arch/hppa/conf/files.hppa
index f5e7d0cbcee..821c30707ef 100644
--- a/sys/arch/hppa/conf/files.hppa
+++ b/sys/arch/hppa/conf/files.hppa
@@ -1,4 +1,4 @@
-# $OpenBSD: files.hppa,v 1.88 2011/04/10 02:54:46 deraadt Exp $
+# $OpenBSD: files.hppa,v 1.89 2011/10/06 20:49:28 deraadt Exp $
#
# hppa-specific configuration info
@@ -212,7 +212,6 @@ file arch/hppa/dev/lpt_ssio.c lpt_ssio
###
-major {ccd = 1}
major {vnd = 2}
major {rd = 3}
diff --git a/sys/arch/hppa/hppa/conf.c b/sys/arch/hppa/hppa/conf.c
index b45a1ef33c3..0510d84de25 100644
--- a/sys/arch/hppa/hppa/conf.c
+++ b/sys/arch/hppa/hppa/conf.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: conf.c,v 1.53 2011/01/14 19:04:08 jasper Exp $ */
+/* $OpenBSD: conf.c,v 1.54 2011/10/06 20:49:28 deraadt Exp $ */
/*-
* Copyright (c) 1991 The Regents of the University of California.
@@ -40,7 +40,6 @@
#include <machine/conf.h>
-#include "ccd.h"
#include "vnd.h"
#include "rd.h"
#include "sd.h"
@@ -62,7 +61,7 @@ cdev_decl(fd);
struct bdevsw bdevsw[] =
{
bdev_swap_init(1,sw), /* 0: swap pseudo-device */
- bdev_disk_init(NCCD,ccd), /* 1: concatenated disk driver */
+ bdev_notdef(), /* 1: was: concatenated disk driver */
bdev_disk_init(NVND,vnd), /* 2: vnode disk driver */
bdev_disk_init(NRD,rd), /* 3: RAM disk */
bdev_disk_init(NSD,sd), /* 4: SCSI disk */
@@ -135,7 +134,7 @@ struct cdevsw cdevsw[] =
cdev_tty_init(NPTY,pts), /* 4: pseudo-tty slave */
cdev_ptc_init(NPTY,ptc), /* 5: pseudo-tty master */
cdev_log_init(1,log), /* 6: /dev/klog */
- cdev_disk_init(NCCD,ccd), /* 7: concatenated disk */
+ cdev_notdef(), /* 7: was: concatenated disk */
cdev_disk_init(NVND,vnd), /* 8: vnode disk driver */
cdev_disk_init(NRD,rd), /* 9: RAM disk */
cdev_disk_init(NSD,sd), /* 10: SCSI disk */
@@ -221,7 +220,7 @@ int chrtoblktbl[] = {
/* 4 */ NODEV,
/* 5 */ NODEV,
/* 6 */ NODEV,
- /* 7 */ 1, /* ccd */
+ /* 7 */ NODEV,
/* 8 */ 2, /* vnd */
/* 9 */ 3, /* rd */
/* 10 */ 4, /* sd */
diff --git a/sys/arch/hppa64/conf/RAMDISK b/sys/arch/hppa64/conf/RAMDISK
index 533915a7738..35a7cb25ebc 100644
--- a/sys/arch/hppa64/conf/RAMDISK
+++ b/sys/arch/hppa64/conf/RAMDISK
@@ -1,4 +1,4 @@
-# $OpenBSD: RAMDISK,v 1.12 2011/06/29 20:52:09 matthew Exp $
+# $OpenBSD: RAMDISK,v 1.13 2011/10/06 20:49:28 deraadt Exp $
#
# Diskless kernel config
#
@@ -186,4 +186,3 @@ pseudo-device loop 1 # network loopback
pseudo-device bpfilter 1 # packet filter
pseudo-device pty 16 # pseudo-terminals
pseudo-device ksyms 1 # kernel symbols device
-pseudo-device ccd 4 # concatenated disk devices
diff --git a/sys/arch/hppa64/conf/files.hppa64 b/sys/arch/hppa64/conf/files.hppa64
index 8a8641c0e50..ebf70d44e9a 100644
--- a/sys/arch/hppa64/conf/files.hppa64
+++ b/sys/arch/hppa64/conf/files.hppa64
@@ -1,4 +1,4 @@
-# $OpenBSD: files.hppa64,v 1.15 2011/08/07 20:39:39 kettenis Exp $
+# $OpenBSD: files.hppa64,v 1.16 2011/10/06 20:49:28 deraadt Exp $
#
# hppa64-specific configuration info
@@ -114,7 +114,6 @@ file arch/hppa64/dev/com_ssio.c com_ssio
###
-major {ccd = 1}
major {vnd = 2}
major {rd = 3}
diff --git a/sys/arch/hppa64/hppa64/conf.c b/sys/arch/hppa64/hppa64/conf.c
index 9b232b27392..9ad3f5d7531 100644
--- a/sys/arch/hppa64/hppa64/conf.c
+++ b/sys/arch/hppa64/hppa64/conf.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: conf.c,v 1.20 2011/09/22 21:51:24 jsing Exp $ */
+/* $OpenBSD: conf.c,v 1.21 2011/10/06 20:49:28 deraadt Exp $ */
/*-
* Copyright (c) 1991 The Regents of the University of California.
@@ -40,7 +40,6 @@
#include <machine/conf.h>
-#include "ccd.h"
#include "vnd.h"
#include "rd.h"
#include "sd.h"
@@ -62,7 +61,7 @@ cdev_decl(fd);
struct bdevsw bdevsw[] =
{
bdev_swap_init(1,sw), /* 0: swap pseudo-device */
- bdev_disk_init(NCCD,ccd), /* 1: concatenated disk driver */
+ bdev_notdef(), /* 1: was: concatenated disk driver */
bdev_disk_init(NVND,vnd), /* 2: vnode disk driver */
bdev_disk_init(NRD,rd), /* 3: RAM disk */
bdev_disk_init(NSD,sd), /* 4: SCSI disk */
@@ -135,7 +134,7 @@ struct cdevsw cdevsw[] =
cdev_tty_init(NPTY,pts), /* 4: pseudo-tty slave */
cdev_ptc_init(NPTY,ptc), /* 5: pseudo-tty master */
cdev_log_init(1,log), /* 6: /dev/klog */
- cdev_disk_init(NCCD,ccd), /* 7: concatenated disk */
+ cdev_notdef(), /* 7: was: concatenated disk */
cdev_disk_init(NVND,vnd), /* 8: vnode disk driver */
cdev_disk_init(NRD,rd), /* 9: RAM disk */
cdev_disk_init(NSD,sd), /* 10: SCSI disk */
@@ -221,7 +220,7 @@ int chrtoblktbl[] = {
/* 4 */ NODEV,
/* 5 */ NODEV,
/* 6 */ NODEV,
- /* 7 */ 1, /* ccd */
+ /* 7 */ NODEV,
/* 8 */ 2, /* vnd */
/* 9 */ 3, /* rd */
/* 10 */ 4, /* sd */
diff --git a/sys/arch/i386/conf/RAMDISK_CD b/sys/arch/i386/conf/RAMDISK_CD
index d6a6579c0ae..c63a2e718ac 100644
--- a/sys/arch/i386/conf/RAMDISK_CD
+++ b/sys/arch/i386/conf/RAMDISK_CD
@@ -1,4 +1,4 @@
-# $OpenBSD: RAMDISK_CD,v 1.190 2011/06/29 20:52:09 matthew Exp $
+# $OpenBSD: RAMDISK_CD,v 1.191 2011/10/06 20:49:28 deraadt Exp $
machine i386 # architecture, used by config; REQUIRED
@@ -408,6 +408,5 @@ pseudo-device loop 1 # network loopback
pseudo-device vlan # IEEE 802.1Q VLAN
pseudo-device bpfilter 1 # packet filter
pseudo-device rd 1 # ramdisk
-pseudo-device ccd 4 # concatenated disk devices
pseudo-device wsmux 2
pseudo-device bio 1 # ioctl multiplexing device
diff --git a/sys/arch/i386/conf/files.i386 b/sys/arch/i386/conf/files.i386
index 83028a3ec64..516fbee3f20 100644
--- a/sys/arch/i386/conf/files.i386
+++ b/sys/arch/i386/conf/files.i386
@@ -1,4 +1,4 @@
-# $OpenBSD: files.i386,v 1.207 2011/07/08 20:15:09 ariane Exp $
+# $OpenBSD: files.i386,v 1.208 2011/10/06 20:49:28 deraadt Exp $
#
# new style config file for i386 architecture
#
@@ -8,8 +8,6 @@ maxpartitions 16
maxusers 2 16 100
-major {ccd = 16}
-
file arch/i386/i386/autoconf.c
file arch/i386/i386/bus_space.c
file arch/i386/i386/bus_dma.c
diff --git a/sys/arch/i386/i386/conf.c b/sys/arch/i386/i386/conf.c
index 5bc677714c5..918ff59d360 100644
--- a/sys/arch/i386/i386/conf.c
+++ b/sys/arch/i386/i386/conf.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: conf.c,v 1.138 2011/07/04 22:53:53 tedu Exp $ */
+/* $OpenBSD: conf.c,v 1.139 2011/10/06 20:49:28 deraadt Exp $ */
/* $NetBSD: conf.c,v 1.75 1996/05/03 19:40:20 christos Exp $ */
/*
@@ -53,7 +53,6 @@ bdev_decl(fd);
#include "cd.h"
#include "uk.h"
#include "vnd.h"
-#include "ccd.h"
#include "raid.h"
#include "rd.h"
@@ -75,7 +74,7 @@ struct bdevsw bdevsw[] =
bdev_lkm_dummy(), /* 13 */
bdev_disk_init(NVND,vnd), /* 14: vnode disk driver */
bdev_notdef(), /* 15 */
- bdev_disk_init(NCCD,ccd), /* 16: concatenated disk driver */
+ bdev_notdef(), /* 16: was: concatenated disk driver */
bdev_disk_init(NRD,rd), /* 17: ram disk driver */
bdev_notdef(), /* 18 */
bdev_disk_init(NRAID,raid), /* 19: RAIDframe disk driver */
@@ -213,7 +212,7 @@ struct cdevsw cdevsw[] =
cdev_disk_init(NCD,cd), /* 15: SCSI CD-ROM */
cdev_lpt_init(NLPT,lpt), /* 16: parallel printer */
cdev_ch_init(NCH,ch), /* 17: SCSI autochanger */
- cdev_disk_init(NCCD,ccd), /* 18: concatenated disk driver */
+ cdev_notdef(), /* 18: was: concatenated disk driver */
cdev_notdef(), /* 19 */
cdev_uk_init(NUK,uk), /* 20: unknown SCSI */
cdev_acpiapm_init(1,acpiapm), /* 21: Power Management stuff */
@@ -364,7 +363,7 @@ int chrtoblktbl[] = {
/* 15 */ 6, /* cd */
/* 16 */ NODEV,
/* 17 */ NODEV,
- /* 18 */ 16, /* ccd */
+ /* 18 */ NODEV,
/* 19 */ NODEV,
/* 20 */ NODEV,
/* 21 */ NODEV,
diff --git a/sys/arch/landisk/landisk/conf.c b/sys/arch/landisk/landisk/conf.c
index a7f8d89657c..8842f3bf04c 100644
--- a/sys/arch/landisk/landisk/conf.c
+++ b/sys/arch/landisk/landisk/conf.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: conf.c,v 1.20 2011/09/16 21:01:45 miod Exp $ */
+/* $OpenBSD: conf.c,v 1.21 2011/10/06 20:49:28 deraadt Exp $ */
/*
* Copyright (c) 1994-1998 Mark Brinicombe.
@@ -78,7 +78,6 @@
/*
* Disk/Filesystem pseudo-devices
*/
-#include "ccd.h" /* concatenated disk driver */
#include "rd.h" /* memory disk driver */
#include "raid.h" /* RAIDframe */
#include "vnd.h" /* vnode disk driver */
@@ -168,7 +167,7 @@ struct bdevsw bdevsw[] = {
bdev_disk_init(NRD,rd), /* 18: memory disk */
bdev_disk_init(NVND,vnd), /* 19: vnode disk driver */
bdev_lkm_dummy(), /* 20: */
- bdev_disk_init(NCCD,ccd), /* 21: concatenated disk driver */
+ bdev_notdef(), /* 21: was: concatenated disk driver */
bdev_lkm_dummy(), /* 22: */
bdev_lkm_dummy(), /* 23: */
bdev_disk_init(NSD,sd), /* 24: SCSI disk */
@@ -285,7 +284,7 @@ struct cdevsw cdevsw[] = {
cdev_disk_init(NRD,rd), /* 18: ram disk driver */
cdev_disk_init(NVND,vnd), /* 19: vnode disk driver */
cdev_lkm_dummy(), /* 20: */
- cdev_disk_init(NCCD,ccd), /* 21: concatenated disk driver */
+ cdev_notdef(), /* 21: was: concatenated disk driver */
cdev_bpf_init(NBPFILTER,bpf), /* 22: Berkeley packet filter */
cdev_lkm_dummy(), /* 23: */
cdev_disk_init(NSD,sd), /* 24: SCSI disk */
@@ -438,7 +437,7 @@ int chrtoblktbl[] = {
/* 18 */ 18, /* rd */
/* 19 */ 19, /* vnd */
/* 20 */ NODEV,
- /* 21 */ 21, /* ccd */
+ /* 21 */ NODEV,
/* 22 */ NODEV,
/* 23 */ NODEV,
/* 24 */ 24, /* sd */
diff --git a/sys/arch/loongson/loongson/conf.c b/sys/arch/loongson/loongson/conf.c
index 4d2feded3ea..ae2e77ce174 100644
--- a/sys/arch/loongson/loongson/conf.c
+++ b/sys/arch/loongson/loongson/conf.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: conf.c,v 1.12 2011/01/14 19:04:08 jasper Exp $ */
+/* $OpenBSD: conf.c,v 1.13 2011/10/06 20:49:28 deraadt Exp $ */
/*
* Copyright (c) 1992, 1993
@@ -56,7 +56,6 @@
#include "st.h"
#include "wd.h"
bdev_decl(wd);
-#include "ccd.h"
#include "rd.h"
#include "hotplug.h"
@@ -68,7 +67,7 @@ struct bdevsw bdevsw[] =
bdev_disk_init(NCD,cd), /* 3: SCSI CD-ROM */
bdev_disk_init(NWD,wd), /* 4: ST506/ESDI/IDE disk */
bdev_notdef(), /* 5: */
- bdev_disk_init(NCCD,ccd), /* 6: concatenated disk driver */
+ bdev_notdef(), /* 6: was: concatenated disk driver */
bdev_notdef(), /* 7: */
bdev_disk_init(NRD,rd), /* 8: RAM disk (for install) */
bdev_notdef(), /* 9: */
@@ -161,7 +160,7 @@ struct cdevsw cdevsw[] =
cdev_notdef(), /* 20: */
cdev_notdef(), /* 21: */
cdev_disk_init(NRD,rd), /* 22: ramdisk device */
- cdev_disk_init(NCCD,ccd), /* 23: concatenated disk driver */
+ cdev_notdef(), /* 23: was: concatenated disk driver */
cdev_notdef(), /* 24: */
cdev_wsdisplay_init(NWSDISPLAY, wsdisplay), /* 25: */
cdev_mouse_init(NWSKBD, wskbd), /* 26: */
@@ -290,8 +289,7 @@ int chrtoblktbl[] = {
/* 19 */ NODEV,
/* 20 */ NODEV,
/* 21 */ NODEV,
- /* 22 */ 8, /* rd */
- /* 23 */ 6 /* ccd */
+ /* 22 */ 8 /* rd */
};
int nchrtoblktbl = nitems(chrtoblktbl);
diff --git a/sys/arch/luna88k/luna88k/conf.c b/sys/arch/luna88k/luna88k/conf.c
index 538a2a16ea2..809febbcf5e 100644
--- a/sys/arch/luna88k/luna88k/conf.c
+++ b/sys/arch/luna88k/luna88k/conf.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: conf.c,v 1.16 2011/01/14 19:04:08 jasper Exp $ */
+/* $OpenBSD: conf.c,v 1.17 2011/10/06 20:49:28 deraadt Exp $ */
/*-
* Copyright (c) 1991 The Regents of the University of California.
@@ -45,7 +45,6 @@
#include "bpfilter.h"
#include "tun.h"
#include "vnd.h"
-#include "ccd.h"
#include "rd.h"
#include "cd.h"
#include "ch.h"
@@ -83,7 +82,7 @@ struct bdevsw bdevsw[] =
bdev_disk_init(NCD,cd), /* 6: SCSI CD-ROM */
bdev_disk_init(NRD,rd), /* 7: ramdisk */
bdev_disk_init(NVND,vnd), /* 8: vnode disk driver */
- bdev_disk_init(NCCD,ccd), /* 9: concatenated disk driver */
+ bdev_notdef(), /* 9: was: concatenated disk driver */
bdev_notdef(), /* 10 */
bdev_notdef(), /* 11 */
bdev_notdef(), /* 12 */
@@ -117,7 +116,7 @@ struct cdevsw cdevsw[] =
cdev_mouse_init(NWSMOUSE, /* 15: mouse */
wsmouse),
cdev_mouse_init(NWSMUX,wsmux), /* 16: ws multiplexor */
- cdev_disk_init(NCCD,ccd), /* 17: concatenated disk */
+ cdev_notdef(), /* 17: was: concatenated disk */
cdev_disk_init(NRD,rd), /* 18: ramdisk disk */
cdev_disk_init(NVND,vnd), /* 19: vnode disk */
cdev_tape_init(NST,st), /* 20: SCSI tape */
@@ -224,7 +223,7 @@ int chrtoblktbl[] = {
/* 14 */ NODEV,
/* 15 */ NODEV,
/* 16 */ NODEV,
- /* 17 */ 9, /* ccd */
+ /* 17 */ NODEV,
/* 18 */ 7, /* rd */
/* 19 */ 8, /* vnd */
/* 20 */ 5, /* st */
diff --git a/sys/arch/mac68k/mac68k/conf.c b/sys/arch/mac68k/mac68k/conf.c
index 7808b0b0ad6..cccd2f4827c 100644
--- a/sys/arch/mac68k/mac68k/conf.c
+++ b/sys/arch/mac68k/mac68k/conf.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: conf.c,v 1.48 2011/01/14 19:04:08 jasper Exp $ */
+/* $OpenBSD: conf.c,v 1.49 2011/10/06 20:49:28 deraadt Exp $ */
/* $NetBSD: conf.c,v 1.41 1997/02/11 07:35:49 scottr Exp $ */
/*
@@ -48,7 +48,6 @@
#include "cd.h"
#include "ch.h"
#include "vnd.h"
-#include "ccd.h"
#include "rd.h"
struct bdevsw bdevsw[] =
@@ -62,7 +61,7 @@ struct bdevsw bdevsw[] =
bdev_disk_init(NCD,cd), /* 6: SCSI CD-ROM */
bdev_notdef(), /* 7 */
bdev_disk_init(NVND,vnd), /* 8: vnode disk driver */
- bdev_disk_init(NCCD,ccd), /* 9: concatenated disk driver */
+ bdev_notdef(), /* 9: was: concatenated disk driver */
bdev_notdef(), /* 10 */
bdev_notdef(), /* 11 */
bdev_notdef(), /* 12 */
@@ -130,7 +129,7 @@ struct cdevsw cdevsw[] =
cdev_ch_init(NCH,ch), /* 17: SCSI autochanger */
cdev_disk_init(NRD,rd), /* 18: ramdisk device */
cdev_disk_init(NVND,vnd), /* 19: vnode disk driver */
- cdev_disk_init(NCCD,ccd), /* 20: concatenated disk driver */
+ cdev_notdef(), /* 20: was: concatenated disk driver */
cdev_fd_init(1,filedesc), /* 21: file descriptor pseudo-device */
cdev_bpf_init(NBPFILTER,bpf), /* 22: Berkeley packet filter */
cdev_notdef(), /* 23 was ADB */
@@ -236,8 +235,7 @@ int chrtoblktbl[] = {
/* 16 */ NODEV,
/* 17 */ NODEV,
/* 18 */ 13, /* rd */
- /* 19 */ 8, /* vnd */
- /* 20 */ 9, /* ccd */
+ /* 19 */ 8 /* vnd */
};
int nchrtoblktbl = nitems(chrtoblktbl);
diff --git a/sys/arch/macppc/macppc/conf.c b/sys/arch/macppc/macppc/conf.c
index 3703fb44ac6..0606b2d53cf 100644
--- a/sys/arch/macppc/macppc/conf.c
+++ b/sys/arch/macppc/macppc/conf.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: conf.c,v 1.45 2011/04/19 23:07:54 todd Exp $ */
+/* $OpenBSD: conf.c,v 1.46 2011/10/06 20:49:28 deraadt Exp $ */
/*
* Copyright (c) 1997 Per Fogelstrom
@@ -51,7 +51,6 @@ bdev_decl(wd);
cdev_decl(wd);
#include "vnd.h"
-#include "ccd.h"
#include "raid.h"
struct bdevsw bdevsw[] = {
@@ -71,7 +70,7 @@ struct bdevsw bdevsw[] = {
bdev_lkm_dummy(), /* 13 */
bdev_disk_init(NVND,vnd), /* 14 vnode disk driver*/
bdev_notdef(), /* 15 unknown*/
- bdev_disk_init(NCCD,ccd), /* 16 concatenated disk driver*/
+ bdev_notdef(), /* 16 was: concatenated disk driver*/
bdev_disk_init(NRD,rd), /* 17 ram disk driver*/
bdev_notdef(), /* 18 unknown*/
bdev_disk_init(NRAID,raid), /* 19: RAIDframe disk driver */
@@ -165,7 +164,7 @@ struct cdevsw cdevsw[] = {
cdev_notdef(), /* 15 */
cdev_notdef(), /* 16 */
cdev_disk_init(NRD,rd), /* 17 ram disk driver*/
- cdev_disk_init(NCCD,ccd), /* 18 concatenated disk driver */
+ cdev_notdef(), /* 18 was: concatenated disk driver */
cdev_disk_init(NVND,vnd), /* 19: vnode disk */
cdev_tape_init(NST,st), /* 20: SCSI tape */
cdev_fd_init(1,filedesc), /* 21: file descriptor pseudo-dev */
@@ -300,7 +299,7 @@ int chrtoblktbl[] = {
/* 15 */ NODEV,
/* 16 */ NODEV,
/* 17 */ 17, /* rd */
- /* 18 */ 16, /* ccd */
+ /* 18 */ NODEV,
/* 19 */ 14, /* vnd */
/* 20 */ 5, /* st */
/* 21 */ NODEV,
diff --git a/sys/arch/mvme68k/mvme68k/conf.c b/sys/arch/mvme68k/mvme68k/conf.c
index c2e7b28d8f9..8dd9be0d16f 100644
--- a/sys/arch/mvme68k/mvme68k/conf.c
+++ b/sys/arch/mvme68k/mvme68k/conf.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: conf.c,v 1.52 2011/01/14 19:04:08 jasper Exp $ */
+/* $OpenBSD: conf.c,v 1.53 2011/10/06 20:49:28 deraadt Exp $ */
/*-
* Copyright (c) 1995 Theo de Raadt
@@ -73,7 +73,6 @@
bdev_decl(xd);
#endif
#include "vnd.h"
-#include "ccd.h"
#include "rd.h"
struct bdevsw bdevsw[] =
@@ -83,7 +82,7 @@ struct bdevsw bdevsw[] =
bdev_notdef(), /* 2 */
bdev_swap_init(1,sw), /* 3: swap pseudo-device */
bdev_disk_init(NSD,sd), /* 4: SCSI disk */
- bdev_disk_init(NCCD,ccd), /* 5: concatenated disk driver */
+ bdev_notdef(), /* 5: was: concatenated disk driver */
bdev_disk_init(NVND,vnd), /* 6: vnode disk driver */
bdev_tape_init(NST,st), /* 7: SCSI tape */
bdev_disk_init(NCD,cd), /* 8: SCSI CD-ROM */
@@ -174,7 +173,7 @@ struct cdevsw cdevsw[] =
cdev_tty_init(NDART,dart), /* 14: MC68681 serial (ttyd[0-1]) */
cdev_notdef(), /* 15 */
cdev_notdef(), /* 16 */
- cdev_disk_init(NCCD,ccd), /* 17: concatenated disk */
+ cdev_notdef(), /* 17: was: concatenated disk */
cdev_disk_init(NRD,rd), /* 18: ramdisk device */
cdev_disk_init(NVND,vnd), /* 19: vnode disk */
cdev_tape_init(NST,st), /* 20: SCSI tape */
@@ -285,7 +284,7 @@ int chrtoblktbl[] = {
/* 14 */ NODEV,
/* 15 */ NODEV,
/* 16 */ NODEV,
- /* 17 */ 5, /* ccd */
+ /* 17 */ NODEV,
/* 18 */ 9, /* rd */
/* 19 */ 6, /* vnd */
/* 20 */ 7, /* st */
diff --git a/sys/arch/mvme88k/mvme88k/conf.c b/sys/arch/mvme88k/mvme88k/conf.c
index c23c72b249f..71dbd9c4037 100644
--- a/sys/arch/mvme88k/mvme88k/conf.c
+++ b/sys/arch/mvme88k/mvme88k/conf.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: conf.c,v 1.45 2011/10/06 19:50:59 deraadt Exp $ */
+/* $OpenBSD: conf.c,v 1.46 2011/10/06 20:49:28 deraadt Exp $ */
/*-
* Copyright (c) 1991 The Regents of the University of California.
@@ -45,7 +45,6 @@
#include "bpfilter.h"
#include "tun.h"
#include "vnd.h"
-#include "ccd.h"
#include "rd.h"
#include "cd.h"
#include "ch.h"
@@ -116,7 +115,7 @@ struct bdevsw bdevsw[] =
bdev_disk_init(NCD,cd), /* 6: SCSI CD-ROM */
bdev_disk_init(NRD,rd), /* 7: ramdisk */
bdev_disk_init(NVND,vnd), /* 8: vnode disk driver */
- bdev_disk_init(NCCD,ccd), /* 9: concatenated disk driver */
+ bdev_notdef(), /* 9: was: concatenated disk driver */
#if notyet
bdev_disk_init(NXD,xd), /* 10: XD disk */
#else
@@ -156,7 +155,7 @@ struct cdevsw cdevsw[] =
cdev_notdef(), /* 14 */
cdev_tty_init(NVX,vx), /* 15: MVME332XT serial/lpt ttyv[0-7][a-i] */
cdev_notdef(), /* 16 */
- cdev_disk_init(NCCD,ccd), /* 17: concatenated disk */
+ cdev_notdef(), /* 17: was: concatenated disk */
cdev_disk_init(NRD,rd), /* 18: ramdisk disk */
cdev_disk_init(NVND,vnd), /* 19: vnode disk */
cdev_tape_init(NST,st), /* 20: SCSI tape */
@@ -272,7 +271,7 @@ int chrtoblktbl[] = {
/* 14 */ NODEV,
/* 15 */ NODEV,
/* 16 */ NODEV,
- /* 17 */ 9, /* ccd */
+ /* 17 */ NODEV,
/* 18 */ 7, /* rd */
/* 19 */ 8, /* vnd */
/* 20 */ 5, /* st */
diff --git a/sys/arch/octeon/octeon/conf.c b/sys/arch/octeon/octeon/conf.c
index 892ed1f1795..6ea993635f4 100644
--- a/sys/arch/octeon/octeon/conf.c
+++ b/sys/arch/octeon/octeon/conf.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: conf.c,v 1.6 2011/01/14 19:04:08 jasper Exp $ */
+/* $OpenBSD: conf.c,v 1.7 2011/10/06 20:49:28 deraadt Exp $ */
/*
* Copyright (c) 1992, 1993
@@ -56,7 +56,6 @@
#include "st.h"
#include "wd.h"
bdev_decl(wd);
-#include "ccd.h"
#include "rd.h"
#include "hotplug.h"
@@ -71,7 +70,7 @@ struct bdevsw bdevsw[] =
bdev_disk_init(NCD,cd), /* 3: SCSI CD-ROM */
bdev_disk_init(NWD,wd), /* 4: ST506/ESDI/IDE disk */
bdev_notdef(), /* 5: */
- bdev_disk_init(NCCD,ccd), /* 6: concatenated disk driver */
+ bdev_notdef(), /* 6: was: concatenated disk driver */
bdev_notdef(), /* 7: */
bdev_disk_init(NRD,rd), /* 8: RAM disk (for install) */
bdev_notdef(), /* 9: */
@@ -172,7 +171,7 @@ struct cdevsw cdevsw[] =
cdev_notdef(), /* 20: */
cdev_notdef(), /* 21: */
cdev_disk_init(NRD,rd), /* 22: ramdisk device */
- cdev_disk_init(NCCD,ccd), /* 23: concatenated disk driver */
+ cdev_notdef(), /* 23: was: concatenated disk driver */
cdev_notdef(), /* 24: */
cdev_wsdisplay_init(NWSDISPLAY, wsdisplay), /* 25: */
cdev_mouse_init(NWSKBD, wskbd), /* 26: */
@@ -301,8 +300,7 @@ int chrtoblktbl[] = {
/* 19 */ NODEV,
/* 20 */ NODEV,
/* 21 */ NODEV,
- /* 22 */ 8, /* rd */
- /* 23 */ 6 /* ccd */
+ /* 22 */ 8 /* rd */
};
int nchrtoblktbl = nitems(chrtoblktbl);
diff --git a/sys/arch/sgi/sgi/conf.c b/sys/arch/sgi/sgi/conf.c
index 424ed569bb8..9a229de9161 100644
--- a/sys/arch/sgi/sgi/conf.c
+++ b/sys/arch/sgi/sgi/conf.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: conf.c,v 1.28 2011/01/14 19:04:08 jasper Exp $ */
+/* $OpenBSD: conf.c,v 1.29 2011/10/06 20:49:28 deraadt Exp $ */
/*
* Copyright (c) 1992, 1993
@@ -56,7 +56,6 @@
#include "st.h"
#include "wd.h"
bdev_decl(wd);
-#include "ccd.h"
#include "rd.h"
#include "hotplug.h"
@@ -68,7 +67,7 @@ struct bdevsw bdevsw[] =
bdev_disk_init(NCD,cd), /* 3: SCSI CD-ROM */
bdev_disk_init(NWD,wd), /* 4: ST506/ESDI/IDE disk */
bdev_notdef(), /* 5: */
- bdev_disk_init(NCCD,ccd), /* 6: concatenated disk driver */
+ bdev_notdef(), /* 6: was: concatenated disk driver */
bdev_notdef(), /* 7: */
bdev_disk_init(NRD,rd), /* 8: RAM disk (for install) */
bdev_notdef(), /* 9: */
@@ -159,7 +158,7 @@ struct cdevsw cdevsw[] =
cdev_notdef(), /* 20: */
cdev_notdef(), /* 21: */
cdev_disk_init(NRD,rd), /* 22: ramdisk device */
- cdev_disk_init(NCCD,ccd), /* 23: concatenated disk driver */
+ cdev_notdef(), /* 23: was: concatenated disk driver */
cdev_notdef(), /* 24: */
cdev_wsdisplay_init(NWSDISPLAY, wsdisplay), /* 25: */
cdev_mouse_init(NWSKBD, wskbd), /* 26: */
@@ -288,8 +287,7 @@ int chrtoblktbl[] = {
/* 19 */ NODEV,
/* 20 */ NODEV,
/* 21 */ NODEV,
- /* 22 */ 8, /* rd */
- /* 23 */ 6 /* ccd */
+ /* 22 */ 8 /* rd */
};
int nchrtoblktbl = nitems(chrtoblktbl);
diff --git a/sys/arch/socppc/socppc/conf.c b/sys/arch/socppc/socppc/conf.c
index 28ea9253c98..e760f64f29e 100644
--- a/sys/arch/socppc/socppc/conf.c
+++ b/sys/arch/socppc/socppc/conf.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: conf.c,v 1.14 2011/01/14 19:04:08 jasper Exp $ */
+/* $OpenBSD: conf.c,v 1.15 2011/10/06 20:49:28 deraadt Exp $ */
/*
* Copyright (c) 1997 Per Fogelstrom
@@ -48,7 +48,6 @@ bdev_decl(wd);
cdev_decl(wd);
#include "vnd.h"
-#include "ccd.h"
#include "raid.h"
#include "video.h"
@@ -69,7 +68,7 @@ struct bdevsw bdevsw[] = {
bdev_lkm_dummy(), /* 13 */
bdev_disk_init(NVND,vnd), /* 14 vnode disk driver*/
bdev_notdef(), /* 15 unknown*/
- bdev_disk_init(NCCD,ccd), /* 16 concatenated disk driver */
+ bdev_notdef(), /* 16: was: concatenated disk driver */
bdev_disk_init(NRD,rd), /* 17 ram disk driver*/
bdev_notdef(), /* 18 unknown*/
bdev_disk_init(NRAID,raid), /* 19 RAIDframe disk driver */
@@ -141,7 +140,7 @@ struct cdevsw cdevsw[] = {
cdev_notdef(), /* 15 */
cdev_notdef(), /* 16 */
cdev_disk_init(NRD,rd), /* 17 ram disk driver*/
- cdev_disk_init(NCCD,ccd), /* 18 concatenated disk driver */
+ cdev_notdef(), /* 18 was: concatenated disk driver */
cdev_disk_init(NVND,vnd), /* 19: vnode disk */
cdev_tape_init(NST,st), /* 20: SCSI tape */
cdev_fd_init(1,filedesc), /* 21: file descriptor pseudo-dev */
@@ -269,7 +268,7 @@ int chrtoblktbl[] = {
/* 15 */ NODEV,
/* 16 */ NODEV,
/* 17 */ 17, /* rd */
- /* 18 */ 16, /* ccd */
+ /* 18 */ NODEV,
/* 19 */ 14, /* vnd */
/* 20 */ 5, /* st */
/* 21 */ NODEV,
diff --git a/sys/arch/sparc/sparc/conf.c b/sys/arch/sparc/sparc/conf.c
index 7c0096ac053..59af317c79e 100644
--- a/sys/arch/sparc/sparc/conf.c
+++ b/sys/arch/sparc/sparc/conf.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: conf.c,v 1.58 2011/07/04 22:53:53 tedu Exp $ */
+/* $OpenBSD: conf.c,v 1.59 2011/10/06 20:49:28 deraadt Exp $ */
/* $NetBSD: conf.c,v 1.40 1996/04/11 19:20:03 thorpej Exp $ */
/*
@@ -57,7 +57,6 @@
#include "tun.h"
#include "audio.h"
#include "vnd.h"
-#include "ccd.h"
#include "raid.h"
#include "ch.h"
#include "uk.h"
@@ -103,7 +102,7 @@ struct bdevsw bdevsw[] =
bdev_notdef(), /* 6 */
bdev_disk_init(NSD,sd), /* 7: SCSI disk */
bdev_disk_init(NVND,vnd), /* 8: vnode disk driver */
- bdev_disk_init(NCCD,ccd), /* 9: concatenated disk driver */
+ bdev_notdef(), /* 9: was: concatenated disk driver */
bdev_disk_init(NXD,xd), /* 10: SMD disk */
bdev_tape_init(NST,st), /* 11: SCSI tape */
bdev_notdef(), /* 12 */
@@ -156,7 +155,7 @@ struct cdevsw cdevsw[] =
cdev_tty_init(NPTY,pts), /* 20: pseudo-tty slave */
cdev_ptc_init(NPTY,ptc), /* 21: pseudo-tty master */
cdev_notdef(), /* 22: was /dev/fb */
- cdev_disk_init(NCCD,ccd), /* 23: concatenated disk driver */
+ cdev_notdef(), /* 23: was: concatenated disk driver */
cdev_fd_init(1,filedesc), /* 24: file descriptor pseudo-device */
cdev_disk_init(NPRESTO,presto), /* 25: Prestoserve NVRAM */
cdev_notdef(), /* 26 */
diff --git a/sys/arch/sparc64/sparc64/conf.c b/sys/arch/sparc64/sparc64/conf.c
index 975fe74aecd..3dff66388a1 100644
--- a/sys/arch/sparc64/sparc64/conf.c
+++ b/sys/arch/sparc64/sparc64/conf.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: conf.c,v 1.60 2011/07/04 22:53:53 tedu Exp $ */
+/* $OpenBSD: conf.c,v 1.61 2011/10/06 20:49:28 deraadt Exp $ */
/* $NetBSD: conf.c,v 1.17 2001/03/26 12:33:26 lukem Exp $ */
/*
@@ -59,7 +59,6 @@
#include "audio.h"
#include "video.h"
#include "vnd.h"
-#include "ccd.h"
#include "ch.h"
#include "sd.h"
#include "st.h"
@@ -134,7 +133,7 @@ struct bdevsw bdevsw[] =
bdev_notdef(), /* 6 */
bdev_disk_init(NSD,sd), /* 7: SCSI disk */
bdev_disk_init(NVND,vnd), /* 8: vnode disk driver */
- bdev_disk_init(NCCD,ccd), /* 9: concatenated disk driver */
+ bdev_notdef(), /* 9: was: concatenated disk driver */
bdev_notdef(), /* 10: SMD disk -- not this arch */
bdev_tape_init(NST,st), /* 11: SCSI tape */
bdev_disk_init(NWD,wd), /* 12: IDE disk */
@@ -179,7 +178,7 @@ struct cdevsw cdevsw[] =
cdev_tty_init(NPTY,pts), /* 20: pseudo-tty slave */
cdev_ptc_init(NPTY,ptc), /* 21: pseudo-tty master */
cdev_notdef(), /* 22 */
- cdev_disk_init(NCCD,ccd), /* 23: concatenated disk driver */
+ cdev_notdef(), /* 23: was: concatenated disk driver */
cdev_fd_init(1,filedesc), /* 24: file descriptor pseudo-device */
cdev_uperf_init(NUPERF,uperf), /* 25: performance counters */
cdev_disk_init(NWD,wd), /* 26: IDE disk */
diff --git a/sys/arch/vax/vax/conf.c b/sys/arch/vax/vax/conf.c
index fde08bbd4e0..91fecf475d0 100644
--- a/sys/arch/vax/vax/conf.c
+++ b/sys/arch/vax/vax/conf.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: conf.c,v 1.65 2011/09/03 20:41:31 miod Exp $ */
+/* $OpenBSD: conf.c,v 1.66 2011/10/06 20:49:28 deraadt Exp $ */
/* $NetBSD: conf.c,v 1.44 1999/10/27 16:38:54 ragge Exp $ */
/*-
@@ -49,8 +49,6 @@ bdev_decl(mt);
bdev_decl(ra);
bdev_decl(rx);
-#include "ccd.h"
-
#include "raid.h"
#include "vnd.h"
@@ -84,7 +82,7 @@ struct bdevsw bdevsw[] =
bdev_notdef(), /* 14 */
bdev_tape_init(NMT,mt), /* 15: MSCP tape */
bdev_notdef(), /* 16: was: KDB50/RA?? */
- bdev_disk_init(NCCD,ccd), /* 17: concatenated disk driver */
+ bdev_notdef(), /* 17: was: concatenated disk driver */
bdev_disk_init(NVND,vnd), /* 18: vnode disk driver */
bdev_disk_init(NHD,hd), /* 19: VS3100 ST506 disk */
bdev_disk_init(NSD,sd), /* 20: SCSI disk */
@@ -241,7 +239,7 @@ struct cdevsw cdevsw[] =
cdev_notdef(), /* 51 */
cdev_notdef(), /* 52: was: KDB50/RA?? */
cdev_fd_init(1,filedesc), /* 53: file descriptor pseudo-device */
- cdev_disk_init(NCCD,ccd), /* 54: concatenated disk driver */
+ cdev_notdef(), /* 54: was: concatenated disk driver */
cdev_disk_init(NVND,vnd), /* 55: vnode disk driver */
cdev_bpf_init(NBPFILTER,bpf), /* 56: berkeley packet filter */
cdev_tun_init(NTUN,tun), /* 57: tunnel filter */
@@ -344,7 +342,7 @@ int chrtoblktbl[] = {
NODEV, /* 51 */
NODEV, /* 52 */
NODEV, /* 53 */
- 17, /* 54 ccd */
+ NODEV, /* 54 */
18, /* 55 vnd */
NODEV, /* 56 */
NODEV, /* 57 */
diff --git a/sys/conf/GENERIC b/sys/conf/GENERIC
index 897b2e63984..71f02b01fe4 100644
--- a/sys/conf/GENERIC
+++ b/sys/conf/GENERIC
@@ -1,4 +1,4 @@
-# $OpenBSD: GENERIC,v 1.183 2011/08/21 20:19:56 matthieu Exp $
+# $OpenBSD: GENERIC,v 1.184 2011/10/06 20:49:28 deraadt Exp $
#
# Machine-independent option; used by all architectures for their
# GENERIC kernel
@@ -86,7 +86,6 @@ pseudo-device nmea 1 # NMEA 0183 line discipline
pseudo-device msts 1 # MSTS line discipline
pseudo-device endrun 1 # EndRun line discipline
pseudo-device vnd 4 # vnode disk devices
-pseudo-device ccd 4 # concatenated disk devices
pseudo-device ksyms 1 # kernel symbols device
pseudo-device systrace 1 # system call tracing device
diff --git a/sys/conf/files b/sys/conf/files
index 14d9c44ec11..4446d70a388 100644
--- a/sys/conf/files
+++ b/sys/conf/files
@@ -1,4 +1,4 @@
-# $OpenBSD: files,v 1.527 2011/09/03 20:03:27 miod Exp $
+# $OpenBSD: files,v 1.528 2011/10/06 20:49:28 deraadt Exp $
# $NetBSD: files,v 1.87 1996/05/19 17:17:50 jonathan Exp $
# @(#)files.newconf 7.5 (Berkeley) 5/10/93
@@ -494,7 +494,6 @@ file dev/spdmem.c spdmem
# legitimate pseudo-devices
pseudo-device vnd: disk
-pseudo-device ccd: disk
pseudo-device raid: disk
pseudo-device rd: disk
file dev/rd.c rd needs-flag
@@ -586,7 +585,6 @@ file ddb/db_write_cmd.c ddb
file ddb/db_usrreq.c ddb
file dev/auconv.c auconv
file dev/audio.c audio needs-flag
-file dev/ccd.c ccd needs-flag
file dev/cons.c
file dev/diskmap.c
file dev/firmload.c firmload
diff --git a/sys/dev/ccd.c b/sys/dev/ccd.c
deleted file mode 100644
index 9f6a0bb04a7..00000000000
--- a/sys/dev/ccd.c
+++ /dev/null
@@ -1,1345 +0,0 @@
-/* $OpenBSD: ccd.c,v 1.97 2011/07/06 04:49:36 matthew Exp $ */
-/* $NetBSD: ccd.c,v 1.33 1996/05/05 04:21:14 thorpej Exp $ */
-
-/*-
- * Copyright (c) 1996 The NetBSD Foundation, Inc.
- * Copyright (c) 1997 Niklas Hallqvist.
- * Copyright (c) 2005 Michael Shalayeff.
- * All rights reserved.
- *
- * This code is derived from software contributed to The NetBSD Foundation
- * by Jason R. Thorpe.
- *
- * 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.
- *
- * 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.
- */
-
-/*
- * Copyright (c) 1988 University of Utah.
- * Copyright (c) 1990, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * This code is derived from software contributed to Berkeley by
- * the Systems Programming Group of the University of Utah Computer
- * Science Department.
- *
- * 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.
- *
- * from: Utah $Hdr: cd.c 1.6 90/11/28$
- *
- * @(#)cd.c 8.2 (Berkeley) 11/16/93
- */
-
-/*
- * "Concatenated" disk driver.
- *
- * Dynamic configuration and disklabel support by:
- * Jason R. Thorpe <thorpej@nas.nasa.gov>
- * Numerical Aerodynamic Simulation Facility
- * Mail Stop 258-6
- * NASA Ames Research Center
- * Moffett Field, CA 94035
- *
- * Mirroring support based on code written by Satoshi Asami
- * and Nisha Talagala.
- */
-/* #define CCDDEBUG */
-
-#include <sys/param.h>
-#include <sys/systm.h>
-#include <sys/proc.h>
-#include <sys/errno.h>
-#include <sys/buf.h>
-#include <sys/malloc.h>
-#include <sys/pool.h>
-#include <sys/namei.h>
-#include <sys/stat.h>
-#include <sys/ioctl.h>
-#include <sys/disklabel.h>
-#include <sys/device.h>
-#include <sys/disk.h>
-#include <sys/syslog.h>
-#include <sys/fcntl.h>
-#include <sys/vnode.h>
-#include <sys/conf.h>
-#include <sys/rwlock.h>
-#include <sys/dkio.h>
-
-#include <dev/ccdvar.h>
-
-#ifdef __GNUC__
-#define INLINE static __inline
-#else
-#define INLINE
-#endif
-
-/*
- * A concatenated disk is described after initialization by this structure.
- */
-struct ccd_softc {
- struct disk sc_dkdev; /* generic disk device info */
- struct ccdgeom sc_geom; /* pseudo geometry info */
- struct ccdcinfo *sc_cinfo; /* component info */
- struct ccdiinfo *sc_itable; /* interleave table */
- char sc_xname[8]; /* XXX external name */
- size_t sc_size; /* size of ccd */
- int sc_flags; /* flags */
- int sc_cflags; /* copy of ccd_flags */
- int sc_ileave; /* interleave */
- u_int sc_nccdisks; /* # of components */
- u_int sc_nccunits; /* # of components for data */
- struct rwlock sc_rwlock; /* lock */
-
-};
-
-/* sc_flags */
-#define CCDF_INITED 0x01 /* unit has been initialized */
-
-#ifdef CCDDEBUG
-#define CCD_DCALL(m,c) if (ccddebug & (m)) c
-#define CCD_DPRINTF(m,a) CCD_DCALL(m, printf a)
-#define CCDB_FOLLOW 0x01
-#define CCDB_INIT 0x02
-#define CCDB_IO 0x04
-#define CCDB_LABEL 0x08
-#define CCDB_VNODE 0x10
-int ccddebug = 0x00;
-#else
-#define CCD_DCALL(m,c) /* m, c */
-#define CCD_DPRINTF(m,a) /* m, a */
-#endif
-
-struct ccdbuf {
- struct buf cb_buf; /* new I/O buf */
- struct buf *cb_obp; /* ptr. to original I/O buf */
- struct ccd_softc*cb_sc; /* point back to the device */
- struct ccdbuf *cb_dep; /* mutual ptrs for mirror part */
- int cb_comp; /* target component */
- int cb_flags; /* misc. flags */
-#define CBF_MIRROR 0x01 /* we're for a mirror component */
-#define CBF_DONE 0x02 /* this buffer is done */
-};
-
-/* called by main() at boot time */
-void ccdattach(int);
-
-/* called by biodone() at interrupt time */
-void ccdiodone(struct buf *);
-daddr64_t ccdsize(dev_t);
-
-void ccdstart(struct ccd_softc *, struct buf *);
-void ccdinterleave(struct ccd_softc *);
-void ccdintr(struct ccd_softc *, struct buf *);
-int ccdinit(struct ccddevice *, char **, struct proc *);
-int ccdlookup(char *, struct proc *p, struct vnode **);
-long ccdbuffer(struct ccd_softc *, struct buf *, daddr64_t, caddr_t,
- long, struct ccdbuf **);
-int ccdgetdisklabel(dev_t, struct ccd_softc *, struct disklabel *, int);
-INLINE struct ccdbuf *getccdbuf(void);
-INLINE void putccdbuf(struct ccdbuf *);
-
-#define ccdlock(sc) rw_enter(&sc->sc_rwlock, RW_WRITE|RW_INTR)
-#define ccdunlock(sc) rw_exit_write(&sc->sc_rwlock)
-
-#ifdef CCDDEBUG
-void printiinfo(struct ccdiinfo *);
-#endif
-
-/* Non-private for the benefit of libkvm. */
-struct ccd_softc *ccd_softc;
-struct ccddevice *ccddevs;
-int numccd = 0;
-
-/*
- * struct ccdbuf allocator
- */
-struct pool ccdbufpl;
-
-/*
- * Manage the ccd buffer structures.
- */
-INLINE struct ccdbuf *
-getccdbuf(void)
-{
- struct ccdbuf *cbp;
-
- cbp = pool_get(&ccdbufpl, PR_WAITOK | PR_ZERO);
-
- return (cbp);
-}
-
-INLINE void
-putccdbuf(struct ccdbuf *cbp)
-{
- pool_put(&ccdbufpl, cbp);
-}
-
-/*
- * Called by main() during pseudo-device attachment. All we need
- * to do is allocate enough space for devices to be configured later.
- */
-void
-ccdattach(int num)
-{
- int i;
-
- if (num <= 0) {
-#ifdef DIAGNOSTIC
- panic("ccdattach: count <= 0");
-#endif
- return;
- }
-
- ccd_softc = (struct ccd_softc *)malloc(num * sizeof(struct ccd_softc),
- M_DEVBUF, M_NOWAIT | M_ZERO);
- ccddevs = (struct ccddevice *)malloc(num * sizeof(struct ccddevice),
- M_DEVBUF, M_NOWAIT | M_ZERO);
- if ((ccd_softc == NULL) || (ccddevs == NULL)) {
- printf("WARNING: no memory for concatenated disks\n");
- if (ccd_softc != NULL)
- free(ccd_softc, M_DEVBUF);
- if (ccddevs != NULL)
- free(ccddevs, M_DEVBUF);
- return;
- }
- for (i = 0; i < num; i++) {
- rw_init(&ccd_softc[i].sc_rwlock, "ccdlock");
- }
- numccd = num;
-
- pool_init(&ccdbufpl, sizeof(struct ccdbuf), 0, 0, 0, "ccdbufpl", NULL);
- pool_setlowat(&ccdbufpl, 16);
- pool_sethiwat(&ccdbufpl, 1024);
-}
-
-int
-ccdinit(struct ccddevice *ccd, char **cpaths, struct proc *p)
-{
- struct ccd_softc *cs = &ccd_softc[ccd->ccd_unit];
- struct ccdcinfo *ci = NULL;
- daddr64_t size;
- int ix;
- struct vnode *vp;
- struct vattr va;
- size_t minsize;
- int maxsecsize;
- struct partinfo dpart;
- struct ccdgeom *ccg = &cs->sc_geom;
- char tmppath[MAXPATHLEN];
- int error;
-
- CCD_DPRINTF(CCDB_FOLLOW | CCDB_INIT, ("ccdinit: unit %d cflags %b\n",
- ccd->ccd_unit, ccd->ccd_flags, CCDF_BITS));
-
- cs->sc_size = 0;
- cs->sc_ileave = ccd->ccd_interleave;
- cs->sc_nccdisks = ccd->ccd_ndev;
- if (snprintf(cs->sc_xname, sizeof(cs->sc_xname), "ccd%d",
- ccd->ccd_unit) >= sizeof(cs->sc_xname)) {
- printf("ccdinit: device name too long.\n");
- return(ENXIO);
- }
-
- /* Allocate space for the component info. */
- cs->sc_cinfo = malloc(cs->sc_nccdisks * sizeof(struct ccdcinfo),
- M_DEVBUF, M_WAITOK | M_ZERO);
-
- /*
- * Verify that each component piece exists and record
- * relevant information about it.
- */
- maxsecsize = 0;
- minsize = 0;
- for (ix = 0; ix < cs->sc_nccdisks; ix++) {
- vp = ccd->ccd_vpp[ix];
- ci = &cs->sc_cinfo[ix];
- ci->ci_vp = vp;
-
- /*
- * Copy in the pathname of the component.
- */
- bzero(tmppath, sizeof(tmppath)); /* sanity */
- error = copyinstr(cpaths[ix], tmppath,
- MAXPATHLEN, &ci->ci_pathlen);
- if (error) {
- CCD_DPRINTF(CCDB_FOLLOW | CCDB_INIT,
- ("%s: can't copy path, error = %d\n",
- cs->sc_xname, error));
- free(cs->sc_cinfo, M_DEVBUF);
- return (error);
- }
- ci->ci_path = malloc(ci->ci_pathlen, M_DEVBUF, M_WAITOK);
- bcopy(tmppath, ci->ci_path, ci->ci_pathlen);
-
- /*
- * XXX: Cache the component's dev_t.
- */
- if ((error = VOP_GETATTR(vp, &va, p->p_ucred, p)) != 0) {
- CCD_DPRINTF(CCDB_FOLLOW | CCDB_INIT,
- ("%s: %s: getattr failed error = %d\n",
- cs->sc_xname, ci->ci_path, error));
- free(ci->ci_path, M_DEVBUF);
- free(cs->sc_cinfo, M_DEVBUF);
- return (error);
- }
- ci->ci_dev = va.va_rdev;
-
- /*
- * Get partition information for the component.
- */
- error = VOP_IOCTL(vp, DIOCGPART, (caddr_t)&dpart,
- FREAD, p->p_ucred, p);
- if (error) {
- CCD_DPRINTF(CCDB_FOLLOW | CCDB_INIT,
- ("%s: %s: ioctl failed, error = %d\n",
- cs->sc_xname, ci->ci_path, error));
- free(ci->ci_path, M_DEVBUF);
- free(cs->sc_cinfo, M_DEVBUF);
- return (error);
- }
- if (dpart.part->p_fstype == FS_CCD ||
- dpart.part->p_fstype == FS_BSDFFS) {
- maxsecsize =
- ((dpart.disklab->d_secsize > maxsecsize) ?
- dpart.disklab->d_secsize : maxsecsize);
- size = DL_GETPSIZE(dpart.part);
- } else {
- CCD_DPRINTF(CCDB_FOLLOW | CCDB_INIT,
- ("%s: %s: incorrect partition type\n",
- cs->sc_xname, ci->ci_path));
- free(ci->ci_path, M_DEVBUF);
- free(cs->sc_cinfo, M_DEVBUF);
- return (EFTYPE);
- }
-
- /*
- * Calculate the size, truncating to an interleave
- * boundary if necessary.
- */
- if (cs->sc_ileave > 1)
- size -= size % cs->sc_ileave;
-
- if (size == 0) {
- CCD_DPRINTF(CCDB_FOLLOW | CCDB_INIT,
- ("%s: %s: size == 0\n", cs->sc_xname, ci->ci_path));
- free(ci->ci_path, M_DEVBUF);
- free(cs->sc_cinfo, M_DEVBUF);
- return (ENODEV);
- }
-
- if (minsize == 0 || size < minsize)
- minsize = size;
- ci->ci_size = size;
- cs->sc_size += size;
- }
- ccg->ccg_rpm = 0;
-
- /*
- * Don't allow the interleave to be smaller than
- * the biggest component sector.
- */
- if ((cs->sc_ileave > 0) &&
- (cs->sc_ileave < (maxsecsize / DEV_BSIZE))) {
- CCD_DPRINTF(CCDB_FOLLOW | CCDB_INIT,
- ("%s: interleave must be at least %d\n",
- cs->sc_xname, (maxsecsize / DEV_BSIZE)));
- free(ci->ci_path, M_DEVBUF);
- free(cs->sc_cinfo, M_DEVBUF);
- return (EINVAL);
- }
-
- /*
- * Mirroring support requires uniform interleave and
- * and even number of components.
- */
- if (ccd->ccd_flags & CCDF_MIRROR) {
- ccd->ccd_flags |= CCDF_UNIFORM;
- if (cs->sc_ileave == 0) {
- CCD_DPRINTF(CCDB_FOLLOW | CCDB_INIT,
- ("%s: mirroring requires interleave\n",
- cs->sc_xname));
- free(ci->ci_path, M_DEVBUF);
- free(cs->sc_cinfo, M_DEVBUF);
- return (EINVAL);
- }
- if (cs->sc_nccdisks % 2) {
- CCD_DPRINTF(CCDB_FOLLOW | CCDB_INIT,
- ("%s: mirroring requires even # of components\n",
- cs->sc_xname));
- free(ci->ci_path, M_DEVBUF);
- free(cs->sc_cinfo, M_DEVBUF);
- return (EINVAL);
- }
- }
-
- /*
- * If uniform interleave is desired set all sizes to that of
- * the smallest component.
- */
- ccg->ccg_ntracks = cs->sc_nccunits = cs->sc_nccdisks;
- if (ccd->ccd_flags & CCDF_UNIFORM) {
- for (ci = cs->sc_cinfo;
- ci < &cs->sc_cinfo[cs->sc_nccdisks]; ci++)
- ci->ci_size = minsize;
-
- if (ccd->ccd_flags & CCDF_MIRROR)
- cs->sc_nccunits = ccg->ccg_ntracks /= 2;
- cs->sc_size = ccg->ccg_ntracks * minsize;
- }
-
- cs->sc_cflags = ccd->ccd_flags; /* So we can find out later... */
-
- /*
- * Construct the interleave table.
- */
- ccdinterleave(cs);
-
- /*
- * Create pseudo-geometry based on 1MB cylinders. It's
- * pretty close.
- */
- ccg->ccg_secsize = DEV_BSIZE;
- ccg->ccg_nsectors = cs->sc_ileave? cs->sc_ileave :
- 1024 * (1024 / ccg->ccg_secsize);
- ccg->ccg_ncylinders = cs->sc_size / ccg->ccg_ntracks /
- ccg->ccg_nsectors;
-
- cs->sc_flags |= CCDF_INITED;
-
- return (0);
-}
-
-void
-ccdinterleave(struct ccd_softc *cs)
-{
- struct ccdcinfo *ci, *smallci;
- struct ccdiinfo *ii;
- daddr64_t bn, lbn;
- int ix;
- u_long size;
-
- CCD_DPRINTF(CCDB_INIT,
- ("ccdinterleave(%p): ileave %d\n", cs, cs->sc_ileave));
-
- /*
- * Allocate an interleave table.
- * Chances are this is too big, but we don't care.
- */
- size = (cs->sc_nccdisks + 1) * sizeof(struct ccdiinfo);
- cs->sc_itable = (struct ccdiinfo *)malloc(size, M_DEVBUF,
- M_WAITOK | M_ZERO);
-
- /*
- * Trivial case: no interleave (actually interleave of disk size).
- * Each table entry represents a single component in its entirety.
- */
- if (cs->sc_ileave == 0) {
- bn = 0;
- ii = cs->sc_itable;
-
- for (ix = 0; ix < cs->sc_nccdisks; ix++) {
- /* Allocate space for ii_index. */
- ii->ii_index = malloc(sizeof(int), M_DEVBUF, M_WAITOK);
- ii->ii_ndisk = 1;
- ii->ii_startblk = bn;
- ii->ii_startoff = 0;
- ii->ii_index[0] = ix;
- bn += cs->sc_cinfo[ix].ci_size;
- ii++;
- }
- ii->ii_ndisk = 0;
-
- CCD_DCALL(CCDB_INIT, printiinfo(cs->sc_itable));
- return;
- }
-
- /*
- * The following isn't fast or pretty; it doesn't have to be.
- */
- size = 0;
- bn = lbn = 0;
- for (ii = cs->sc_itable; ; ii++) {
- /* Allocate space for ii_index. */
- ii->ii_index = malloc((sizeof(int) * cs->sc_nccdisks),
- M_DEVBUF, M_WAITOK);
-
- /*
- * Locate the smallest of the remaining components
- */
- smallci = NULL;
- for (ci = cs->sc_cinfo;
- ci < &cs->sc_cinfo[cs->sc_nccdisks]; ci++)
- if (ci->ci_size > size &&
- (smallci == NULL ||
- ci->ci_size < smallci->ci_size))
- smallci = ci;
-
- /*
- * Nobody left, all done
- */
- if (smallci == NULL) {
- ii->ii_ndisk = 0;
- break;
- }
-
- /*
- * Record starting logical block and component offset
- */
- ii->ii_startblk = bn / cs->sc_ileave;
- ii->ii_startoff = lbn;
-
- /*
- * Determine how many disks take part in this interleave
- * and record their indices.
- */
- ix = 0;
- for (ci = cs->sc_cinfo;
- ci < &cs->sc_cinfo[cs->sc_nccunits]; ci++)
- if (ci->ci_size >= smallci->ci_size)
- ii->ii_index[ix++] = ci - cs->sc_cinfo;
- ii->ii_ndisk = ix;
- bn += ix * (smallci->ci_size - size);
- lbn = smallci->ci_size / cs->sc_ileave;
- size = smallci->ci_size;
- }
-
- CCD_DCALL(CCDB_INIT, printiinfo(cs->sc_itable));
-}
-
-/* ARGSUSED */
-int
-ccdopen(dev_t dev, int flags, int fmt, struct proc *p)
-{
- int unit = DISKUNIT(dev);
- struct ccd_softc *cs;
- struct disklabel *lp;
- int error = 0, part;
-
- CCD_DPRINTF(CCDB_FOLLOW, ("ccdopen(%x, %x)\n", dev, flags));
-
- if (unit >= numccd)
- return (ENXIO);
- cs = &ccd_softc[unit];
-
- if ((error = ccdlock(cs)) != 0)
- return (error);
-
- lp = cs->sc_dkdev.dk_label;
-
- part = DISKPART(dev);
-
- /*
- * If we're initialized, check to see if there are any other
- * open partitions. If not, then it's safe to update
- * the in-core disklabel.
- */
- if ((cs->sc_flags & CCDF_INITED) && (cs->sc_dkdev.dk_openmask == 0))
- ccdgetdisklabel(dev, cs, lp, 0);
-
- error = disk_openpart(&cs->sc_dkdev, part, fmt,
- (cs->sc_flags & CCDF_INITED) != 0);
-
- ccdunlock(cs);
- return (error);
-}
-
-/* ARGSUSED */
-int
-ccdclose(dev_t dev, int flags, int fmt, struct proc *p)
-{
- int unit = DISKUNIT(dev);
- struct ccd_softc *cs;
- int error = 0, part;
-
- CCD_DPRINTF(CCDB_FOLLOW, ("ccdclose(%x, %x)\n", dev, flags));
-
- if (unit >= numccd)
- return (ENXIO);
- cs = &ccd_softc[unit];
-
- if ((error = ccdlock(cs)) != 0)
- return (error);
-
- part = DISKPART(dev);
-
- disk_closepart(&cs->sc_dkdev, part, fmt);
-
- ccdunlock(cs);
- return (0);
-}
-
-void
-ccdstrategy(struct buf *bp)
-{
- int unit = DISKUNIT(bp->b_dev);
- struct ccd_softc *cs = &ccd_softc[unit];
- int s;
-
- CCD_DPRINTF(CCDB_FOLLOW, ("ccdstrategy(%p): unit %d\n", bp, unit));
-
- if ((cs->sc_flags & CCDF_INITED) == 0) {
- bp->b_error = ENXIO;
- bp->b_flags |= B_ERROR;
- bp->b_resid = bp->b_bcount;
- goto done;
- }
-
- /* Validate the request. */
- if (bounds_check_with_label(bp, cs->sc_dkdev.dk_label) == -1)
- goto done;
-
- bp->b_resid = bp->b_bcount;
-
- /*
- * "Start" the unit.
- */
- s = splbio();
- ccdstart(cs, bp);
- splx(s);
- return;
-
- done:
- s = splbio();
- biodone(bp);
- splx(s);
-}
-
-void
-ccdstart(struct ccd_softc *cs, struct buf *bp)
-{
- long bcount, rcount;
- struct ccdbuf **cbpp;
- caddr_t addr;
- daddr64_t bn;
- struct partition *pp;
-
- CCD_DPRINTF(CCDB_FOLLOW, ("ccdstart(%p, %p, %s)\n", cs, bp,
- bp->b_flags & B_READ? "read" : "write"));
-
- /* Instrumentation. */
- disk_busy(&cs->sc_dkdev);
-
- /*
- * Translate the partition-relative block number to an absolute.
- */
- bn = bp->b_blkno;
- pp = &cs->sc_dkdev.dk_label->d_partitions[DISKPART(bp->b_dev)];
- bn += DL_GETPOFFSET(pp);
-
- /*
- * Allocate component buffers
- */
- cbpp = malloc(2 * cs->sc_nccdisks * sizeof(struct ccdbuf *), M_DEVBUF,
- M_WAITOK | M_ZERO);
- addr = bp->b_data;
- for (bcount = bp->b_bcount; bcount > 0; bcount -= rcount) {
- rcount = ccdbuffer(cs, bp, bn, addr, bcount, cbpp);
-
- /*
- * This is the old, slower, but less restrictive, mode of
- * operation. It allows interleaves which are not multiples
- * of PAGE_SIZE and mirroring.
- */
- if ((cbpp[0]->cb_buf.b_flags & B_READ) == 0)
- cbpp[0]->cb_buf.b_vp->v_numoutput++;
- VOP_STRATEGY(&cbpp[0]->cb_buf);
-
- if ((cs->sc_cflags & CCDF_MIRROR) &&
- ((cbpp[0]->cb_buf.b_flags & B_READ) == 0)) {
- cbpp[1]->cb_buf.b_vp->v_numoutput++;
- VOP_STRATEGY(&cbpp[1]->cb_buf);
- }
-
- bn += btodb(rcount);
- addr += rcount;
- }
-
- free(cbpp, M_DEVBUF);
-}
-
-/*
- * Build a component buffer header.
- */
-long
-ccdbuffer(struct ccd_softc *cs, struct buf *bp, daddr64_t bn, caddr_t addr,
- long bcount, struct ccdbuf **cbpp)
-{
- struct ccdcinfo *ci, *ci2 = NULL;
- struct ccdbuf *cbp;
- daddr64_t cbn, cboff, sblk;
- int ccdisk, ccdisk2, off;
- long cnt;
- struct ccdiinfo *ii;
- struct buf *nbp;
-
- CCD_DPRINTF(CCDB_IO, ("ccdbuffer(%p, %p, %d, %p, %ld, %p)\n",
- cs, bp, bn, addr, bcount, cbpp));
-
- /*
- * Determine which component bn falls in.
- */
- cbn = bn;
- cboff = 0;
-
- if (cs->sc_ileave == 0) {
- /*
- * Serially concatenated
- */
- sblk = 0;
- for (ccdisk = 0, ci = &cs->sc_cinfo[ccdisk];
- cbn >= sblk + ci->ci_size;
- ccdisk++, ci = &cs->sc_cinfo[ccdisk])
- sblk += ci->ci_size;
- cbn -= sblk;
- } else {
- /*
- * Interleaved
- */
- cboff = cbn % cs->sc_ileave;
- cbn /= cs->sc_ileave;
- for (ii = cs->sc_itable; ii->ii_ndisk; ii++)
- if (ii->ii_startblk > cbn)
- break;
- ii--;
- off = cbn - ii->ii_startblk;
- if (ii->ii_ndisk == 1) {
- ccdisk = ii->ii_index[0];
- cbn = ii->ii_startoff + off;
- } else {
- ccdisk = ii->ii_index[off % ii->ii_ndisk];
- cbn = ii->ii_startoff + off / ii->ii_ndisk;
- }
- ci = &cs->sc_cinfo[ccdisk];
- if (cs->sc_cflags & CCDF_MIRROR) {
- /* Mirrored data */
- ccdisk2 = ccdisk + ii->ii_ndisk;
- ci2 = &cs->sc_cinfo[ccdisk2];
- /* spread the read over both parts */
- if (bp->b_flags & B_READ &&
- bcount > bp->b_bcount / 2 &&
- (!(ci2->ci_flags & CCIF_FAILED) ||
- ci->ci_flags & CCIF_FAILED)) {
- ccdisk = ccdisk2;
- ci = ci2;
- }
- }
- cbn *= cs->sc_ileave;
- CCD_DPRINTF(CCDB_IO, ("ccdisk %d cbn %lld ci %p ci2 %p\n",
- ccdisk, cbn, ci, ci2));
- }
-
- /* Limit the operation at next component border */
- if (cs->sc_ileave == 0)
- cnt = dbtob(ci->ci_size - cbn);
- else
- cnt = dbtob(cs->sc_ileave - cboff);
- if (cnt < bcount)
- bcount = cnt;
-
- /*
- * Setup new component buffer.
- */
- cbp = cbpp[0] = getccdbuf();
- cbp->cb_flags = 0;
- nbp = &cbp->cb_buf;
- nbp->b_flags = bp->b_flags | B_CALL;
- nbp->b_iodone = ccdiodone;
- nbp->b_proc = bp->b_proc;
- nbp->b_dev = ci->ci_dev; /* XXX */
- nbp->b_blkno = cbn + cboff;
- nbp->b_vp = ci->ci_vp;
- nbp->b_bcount = bcount;
- LIST_INIT(&nbp->b_dep);
- nbp->b_data = addr;
-
- /*
- * context for ccdiodone
- */
- cbp->cb_obp = bp;
- cbp->cb_sc = cs;
- cbp->cb_comp = ccdisk;
-
- /*
- * Mirrors have an additional write operation that is nearly
- * identical to the first.
- */
- if ((cs->sc_cflags & CCDF_MIRROR) &&
- !(ci2->ci_flags & CCIF_FAILED) &&
- ((cbp->cb_buf.b_flags & B_READ) == 0)) {
- struct ccdbuf *cbp2;
- cbpp[1] = cbp2 = getccdbuf();
- *cbp2 = *cbp;
- cbp2->cb_flags = CBF_MIRROR;
- cbp2->cb_buf.b_dev = ci2->ci_dev; /* XXX */
- cbp2->cb_buf.b_vp = ci2->ci_vp;
- LIST_INIT(&cbp2->cb_buf.b_dep);
- cbp2->cb_comp = ccdisk2;
- cbp2->cb_dep = cbp;
- cbp->cb_dep = cbp2;
- }
-
- CCD_DPRINTF(CCDB_IO, (" dev %x(u%d): cbp %p bn %lld addr %p bcnt %ld\n",
- ci->ci_dev, ci-cs->sc_cinfo, cbp, bp->b_blkno,
- bp->b_data, bp->b_bcount));
-
- return (bcount);
-}
-
-void
-ccdintr(struct ccd_softc *cs, struct buf *bp)
-{
-
- splassert(IPL_BIO);
-
- CCD_DPRINTF(CCDB_FOLLOW, ("ccdintr(%p, %p)\n", cs, bp));
-
- /*
- * Request is done for better or worse, wakeup the top half.
- */
- if (bp->b_flags & B_ERROR)
- bp->b_resid = bp->b_bcount;
- disk_unbusy(&cs->sc_dkdev, (bp->b_bcount - bp->b_resid),
- (bp->b_flags & B_READ));
- biodone(bp);
-}
-
-/*
- * Called at interrupt time.
- * Mark the component as done and if all components are done,
- * take a ccd interrupt.
- */
-void
-ccdiodone(struct buf *vbp)
-{
- struct ccdbuf *cbp = (struct ccdbuf *)vbp;
- struct buf *bp = cbp->cb_obp;
- struct ccd_softc *cs = cbp->cb_sc;
- long count = bp->b_bcount;
- char *comptype;
-
- splassert(IPL_BIO);
-
- CCD_DPRINTF(CCDB_FOLLOW, ("ccdiodone(%p)\n", cbp));
- CCD_DPRINTF(CCDB_IO, (cbp->cb_flags & CBF_MIRROR?
- "ccdiodone: mirror component\n" :
- "ccdiodone: bp %p bcount %ld resid %ld\n",
- bp, bp->b_bcount, bp->b_resid));
- CCD_DPRINTF(CCDB_IO, (" dev %x(u%d), cbp %p bn %lld addr %p bcnt %ld\n",
- vbp->b_dev, cbp->cb_comp, cbp, vbp->b_blkno,
- vbp->b_data, vbp->b_bcount));
-
- if (vbp->b_flags & B_ERROR) {
- cs->sc_cinfo[cbp->cb_comp].ci_flags |= CCIF_FAILED;
- if (cbp->cb_flags & CBF_MIRROR)
- comptype = " (mirror)";
- else {
- bp->b_flags |= B_ERROR;
- bp->b_error = vbp->b_error ?
- vbp->b_error : EIO;
- comptype = "";
- }
-
- printf("%s: error %d on component %d%s\n",
- cs->sc_xname, bp->b_error, cbp->cb_comp, comptype);
- }
- cbp->cb_flags |= CBF_DONE;
-
- if (cbp->cb_dep &&
- (cbp->cb_dep->cb_flags & CBF_DONE) != (cbp->cb_flags & CBF_DONE))
- return;
-
- if (cbp->cb_flags & CBF_MIRROR &&
- !(cbp->cb_dep->cb_flags & CBF_MIRROR)) {
- cbp = cbp->cb_dep;
- vbp = (struct buf *)cbp;
- }
-
- count = vbp->b_bcount;
-
- if (cbp->cb_dep)
- putccdbuf(cbp->cb_dep);
- putccdbuf(cbp);
-
- /*
- * If all done, "interrupt".
- *
- * Note that mirror component buffers aren't counted against
- * the original I/O buffer.
- */
- if (count > bp->b_resid)
- panic("ccdiodone: count");
- bp->b_resid -= count;
- if (bp->b_resid == 0)
- ccdintr(cs, bp);
-}
-
-/* ARGSUSED */
-int
-ccdread(dev_t dev, struct uio *uio, int flags)
-{
- int unit = DISKUNIT(dev);
- struct ccd_softc *cs;
-
- CCD_DPRINTF(CCDB_FOLLOW, ("ccdread(%x, %p)\n", dev, uio));
-
- if (unit >= numccd)
- return (ENXIO);
- cs = &ccd_softc[unit];
-
- if ((cs->sc_flags & CCDF_INITED) == 0)
- return (ENXIO);
-
- /*
- * XXX: It's not clear that using minphys() is completely safe,
- * in particular, for raw I/O. Underlying devices might have some
- * non-obvious limits, because of the copy to user-space.
- */
- return (physio(ccdstrategy, dev, B_READ, minphys, uio));
-}
-
-/* ARGSUSED */
-int
-ccdwrite(dev_t dev, struct uio *uio, int flags)
-{
- int unit = DISKUNIT(dev);
- struct ccd_softc *cs;
-
- CCD_DPRINTF(CCDB_FOLLOW, ("ccdwrite(%x, %p)\n", dev, uio));
-
- if (unit >= numccd)
- return (ENXIO);
- cs = &ccd_softc[unit];
-
- if ((cs->sc_flags & CCDF_INITED) == 0)
- return (ENXIO);
-
- /*
- * XXX: It's not clear that using minphys() is completely safe,
- * in particular, for raw I/O. Underlying devices might have some
- * non-obvious limits, because of the copy to user-space.
- */
- return (physio(ccdstrategy, dev, B_WRITE, minphys, uio));
-}
-
-int
-ccdioctl(dev_t dev, u_long cmd, caddr_t data, int flag, struct proc *p)
-{
- int unit = DISKUNIT(dev);
- int i, j, lookedup = 0, error = 0;
- int part, pmask, s;
- struct disklabel *lp;
- struct ccd_softc *cs;
- struct ccd_ioctl *ccio = (struct ccd_ioctl *)data;
- struct ccddevice ccd;
- char **cpp;
- struct vnode **vpp;
-
- if (unit >= numccd)
- return (ENXIO);
-
- cs = &ccd_softc[unit];
- if (cmd != CCDIOCSET && !(cs->sc_flags & CCDF_INITED))
- return (ENXIO);
-
- /* access control */
- switch (cmd) {
- case CCDIOCSET:
- case CCDIOCCLR:
- case DIOCWDINFO:
- case DIOCSDINFO:
- if ((flag & FWRITE) == 0)
- return (EBADF);
- }
-
- bzero(&ccd, sizeof(ccd));
- switch (cmd) {
- case CCDIOCSET:
- if (cs->sc_flags & CCDF_INITED)
- return (EBUSY);
-
- if (ccio->ccio_ndisks == 0 || ccio->ccio_ndisks > INT_MAX ||
- ccio->ccio_ileave < 0)
- return (EINVAL);
-
- if ((error = ccdlock(cs)) != 0)
- return (error);
-
- /* Fill in some important bits. */
- ccd.ccd_unit = unit;
- ccd.ccd_interleave = ccio->ccio_ileave;
- ccd.ccd_flags = ccio->ccio_flags & CCDF_USERMASK;
-
- /*
- * Allocate space for and copy in the array of
- * componet pathnames and device numbers.
- */
- cpp = malloc(ccio->ccio_ndisks * sizeof(char *),
- M_DEVBUF, M_WAITOK);
- vpp = malloc(ccio->ccio_ndisks * sizeof(struct vnode *),
- M_DEVBUF, M_WAITOK);
-
- error = copyin((caddr_t)ccio->ccio_disks, (caddr_t)cpp,
- ccio->ccio_ndisks * sizeof(char **));
- if (error) {
- free(vpp, M_DEVBUF);
- free(cpp, M_DEVBUF);
- ccdunlock(cs);
- return (error);
- }
-
- for (i = 0; i < ccio->ccio_ndisks; ++i) {
- CCD_DPRINTF(CCDB_INIT,
- ("ccdioctl: component %d: %p, lookedup = %d\n",
- i, cpp[i], lookedup));
- if ((error = ccdlookup(cpp[i], p, &vpp[i])) != 0) {
- for (j = 0; j < lookedup; ++j)
- (void)vn_close(vpp[j], FREAD|FWRITE,
- p->p_ucred, p);
- free(vpp, M_DEVBUF);
- free(cpp, M_DEVBUF);
- ccdunlock(cs);
- return (error);
- }
- ++lookedup;
- }
- ccd.ccd_cpp = cpp;
- ccd.ccd_vpp = vpp;
- ccd.ccd_ndev = ccio->ccio_ndisks;
-
- /*
- * Initialize the ccd. Fills in the softc for us.
- */
- if ((error = ccdinit(&ccd, cpp, p)) != 0) {
- for (j = 0; j < lookedup; ++j)
- (void)vn_close(vpp[j], FREAD|FWRITE,
- p->p_ucred, p);
- bzero(&ccd_softc[unit], sizeof(struct ccd_softc));
- free(vpp, M_DEVBUF);
- free(cpp, M_DEVBUF);
- ccdunlock(cs);
- return (error);
- }
-
- /*
- * The ccd has been successfully initialized, so
- * we can place it into the array. Don't try to
- * read the disklabel until the disk has been attached,
- * because space for the disklabel is allocated
- * in disk_attach();
- */
- bcopy(&ccd, &ccddevs[unit], sizeof(ccd));
- ccio->ccio_unit = unit;
- ccio->ccio_size = cs->sc_size;
-
- /* Attach the disk. */
- cs->sc_dkdev.dk_name = cs->sc_xname;
- disk_attach(NULL, &cs->sc_dkdev);
-
- /* Try and read the disklabel. */
- ccdgetdisklabel(dev, cs, cs->sc_dkdev.dk_label, 0);
-
- ccdunlock(cs);
- break;
-
- case CCDIOCCLR:
- if ((error = ccdlock(cs)) != 0)
- return (error);
-
- /*
- * Don't unconfigure if any other partitions are open
- * or if both the character and block flavors of this
- * partition are open.
- */
- part = DISKPART(dev);
- pmask = (1 << part);
- if ((cs->sc_dkdev.dk_openmask & ~pmask) ||
- ((cs->sc_dkdev.dk_bopenmask & pmask) &&
- (cs->sc_dkdev.dk_copenmask & pmask))) {
- ccdunlock(cs);
- return (EBUSY);
- }
-
- /*
- * Free ccd_softc information and clear entry.
- */
-
- /* Close the components and free their pathnames. */
- for (i = 0; i < cs->sc_nccdisks; ++i) {
- /*
- * XXX: this close could potentially fail and
- * cause Bad Things. Maybe we need to force
- * the close to happen?
- */
-#ifdef DIAGNOSTIC
- CCD_DCALL(CCDB_VNODE, vprint("CCDIOCCLR: vnode info",
- cs->sc_cinfo[i].ci_vp));
-#endif
-
- (void)vn_close(cs->sc_cinfo[i].ci_vp, FREAD|FWRITE,
- p->p_ucred, p);
- free(cs->sc_cinfo[i].ci_path, M_DEVBUF);
- }
-
- /* Free interleave index. */
- for (i = 0; cs->sc_itable[i].ii_ndisk; ++i)
- free(cs->sc_itable[i].ii_index, M_DEVBUF);
-
- /* Free component info and interleave table. */
- free(cs->sc_cinfo, M_DEVBUF);
- free(cs->sc_itable, M_DEVBUF);
- cs->sc_flags &= ~CCDF_INITED;
-
- /*
- * Free ccddevice information and clear entry.
- */
- free(ccddevs[unit].ccd_cpp, M_DEVBUF);
- free(ccddevs[unit].ccd_vpp, M_DEVBUF);
- bcopy(&ccd, &ccddevs[unit], sizeof(ccd));
-
- /* Detach the disk. */
- disk_detach(&cs->sc_dkdev);
-
- /* This must be atomic. */
- s = splhigh();
- ccdunlock(cs);
- bzero(cs, sizeof(struct ccd_softc));
- splx(s);
- break;
-
- case DIOCRLDINFO:
- if ((error = ccdlock(cs)) != 0)
- return (error);
-
- lp = malloc(sizeof(*lp), M_TEMP, M_WAITOK);
- ccdgetdisklabel(dev, cs, lp, 0);
- *(cs->sc_dkdev.dk_label) = *lp;
- free(lp, M_TEMP);
-
- ccdunlock(cs);
- break;
-
- case DIOCGPDINFO:
- if ((error = ccdlock(cs)) != 0)
- return (error);
-
- ccdgetdisklabel(dev, cs, (struct disklabel *)data, 1);
-
- ccdunlock(cs);
- break;
-
- case DIOCGDINFO:
- *(struct disklabel *)data = *(cs->sc_dkdev.dk_label);
- break;
-
- case DIOCGPART:
- ((struct partinfo *)data)->disklab = cs->sc_dkdev.dk_label;
- ((struct partinfo *)data)->part =
- &cs->sc_dkdev.dk_label->d_partitions[DISKPART(dev)];
- break;
-
- case DIOCWDINFO:
- case DIOCSDINFO:
- if ((error = ccdlock(cs)) != 0)
- return (error);
-
- error = setdisklabel(cs->sc_dkdev.dk_label,
- (struct disklabel *)data, 0);
- if (error == 0) {
- if (cmd == DIOCWDINFO)
- error = writedisklabel(DISKLABELDEV(dev),
- ccdstrategy, cs->sc_dkdev.dk_label);
- }
-
- ccdunlock(cs);
-
- if (error)
- return (error);
- break;
-
- default:
- return (ENOTTY);
- }
-
- return (0);
-}
-
-daddr64_t
-ccdsize(dev_t dev)
-{
- struct ccd_softc *cs;
- int part, unit;
- daddr64_t size;
-
- unit = DISKUNIT(dev);
- if (unit >= numccd)
- return (-1);
-
- cs = &ccd_softc[unit];
- if ((cs->sc_flags & CCDF_INITED) == 0)
- return (-1);
-
- if (ccdopen(dev, 0, S_IFBLK, curproc))
- return (-1);
-
- part = DISKPART(dev);
- if (cs->sc_dkdev.dk_label->d_partitions[part].p_fstype != FS_SWAP)
- size = -1;
- else
- size = DL_GETPSIZE(&cs->sc_dkdev.dk_label->d_partitions[part]);
-
- if (ccdclose(dev, 0, S_IFBLK, curproc))
- return (-1);
-
- return (size);
-}
-
-int
-ccddump(dev_t dev, daddr64_t blkno, caddr_t va, size_t size)
-{
-
- /* Not implemented. */
- return ENXIO;
-}
-
-/*
- * Lookup the provided name in the filesystem. If the file exists,
- * is a valid block device, and isn't being used by anyone else,
- * set *vpp to the file's vnode.
- */
-int
-ccdlookup(char *path, struct proc *p, struct vnode **vpp)
-{
- struct nameidata nd;
- struct vnode *vp;
- struct vattr va;
- int error;
-
- NDINIT(&nd, LOOKUP, FOLLOW, UIO_USERSPACE, path, p);
- if ((error = vn_open(&nd, FREAD|FWRITE, 0)) != 0) {
- CCD_DPRINTF(CCDB_FOLLOW | CCDB_INIT,
- ("ccdlookup: vn_open error = %d\n", error));
- return (error);
- }
- vp = nd.ni_vp;
-
- if (vp->v_usecount > 1) {
- VOP_UNLOCK(vp, 0, p);
- (void)vn_close(vp, FREAD|FWRITE, p->p_ucred, p);
- return (EBUSY);
- }
-
- if ((error = VOP_GETATTR(vp, &va, p->p_ucred, p)) != 0) {
- CCD_DPRINTF(CCDB_FOLLOW | CCDB_INIT,
- ("ccdlookup: getattr error = %d\n", error));
- VOP_UNLOCK(vp, 0, p);
- (void)vn_close(vp, FREAD|FWRITE, p->p_ucred, p);
- return (error);
- }
-
- /* XXX: eventually we should handle VREG, too. */
- if (va.va_type != VBLK) {
- VOP_UNLOCK(vp, 0, p);
- (void)vn_close(vp, FREAD|FWRITE, p->p_ucred, p);
- return (ENOTBLK);
- }
-
-#ifdef DIAGNOSTIC
- CCD_DCALL(CCDB_VNODE, vprint("ccdlookup: vnode info", vp));
-#endif
-
- VOP_UNLOCK(vp, 0, p);
- *vpp = vp;
- return (0);
-}
-
-/*
- * Read the disklabel from the ccd. If one is not present, fake one
- * up.
- */
-int
-ccdgetdisklabel(dev_t dev, struct ccd_softc *cs, struct disklabel *lp,
- int spoofonly)
-{
- struct ccdgeom *ccg = &cs->sc_geom;
-
- bzero(lp, sizeof(*lp));
-
- DL_SETDSIZE(lp, cs->sc_size);
- lp->d_secsize = ccg->ccg_secsize;
- lp->d_nsectors = ccg->ccg_nsectors;
- lp->d_ntracks = ccg->ccg_ntracks;
- lp->d_ncylinders = ccg->ccg_ncylinders;
- lp->d_secpercyl = lp->d_ntracks * lp->d_nsectors;
-
- strncpy(lp->d_typename, "ccd", sizeof(lp->d_typename));
- lp->d_type = DTYPE_CCD;
- strncpy(lp->d_packname, "fictitious", sizeof(lp->d_packname));
- lp->d_flags = 0;
- lp->d_version = 1;
-
- lp->d_magic = DISKMAGIC;
- lp->d_magic2 = DISKMAGIC;
- lp->d_checksum = dkcksum(cs->sc_dkdev.dk_label);
-
- /*
- * Call the generic disklabel extraction routine.
- */
- return readdisklabel(DISKLABELDEV(dev), ccdstrategy,
- cs->sc_dkdev.dk_label, spoofonly);
-}
-
-#ifdef CCDDEBUG
-void
-printiinfo(struct ccdiinfo *ii)
-{
- int ix, i;
-
- for (ix = 0; ii->ii_ndisk; ix++, ii++) {
- printf(" itab[%d]: #dk %d sblk %d soff %d",
- ix, ii->ii_ndisk, ii->ii_startblk, ii->ii_startoff);
- for (i = 0; i < ii->ii_ndisk; i++)
- printf(" %d", ii->ii_index[i]);
- printf("\n");
- }
-}
-#endif
diff --git a/sys/dev/ccdvar.h b/sys/dev/ccdvar.h
deleted file mode 100644
index 998413dc918..00000000000
--- a/sys/dev/ccdvar.h
+++ /dev/null
@@ -1,184 +0,0 @@
-/* $OpenBSD: ccdvar.h,v 1.12 2008/06/26 05:42:14 ray Exp $ */
-/* $NetBSD: ccdvar.h,v 1.11 1996/02/28 01:08:32 thorpej Exp $ */
-
-/*-
- * Copyright (c) 1996 The NetBSD Foundation, Inc.
- * All rights reserved.
- *
- * This code is derived from software contributed to The NetBSD Foundation
- * by Jason R. Thorpe.
- *
- * 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.
- *
- * 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.
- */
-
-/*
- * Copyright (c) 1988 University of Utah.
- * Copyright (c) 1990, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * This code is derived from software contributed to Berkeley by
- * the Systems Programming Group of the University of Utah Computer
- * Science Department.
- *
- * 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.
- *
- * from: Utah $Hdr: cdvar.h 1.1 90/07/09$
- *
- * @(#)cdvar.h 8.1 (Berkeley) 6/10/93
- */
-
-/*
- * Dynamic configuration and disklabel support by:
- * Jason R. Thorpe <thorpej@nas.nasa.gov>
- * Numerical Aerodynamic Simulation Facility
- * Mail Stop 258-6
- * NASA Ames Research Center
- * Moffett Field, CA 94035
- */
-
-/*
- * A concatenated disk is described at initialization time by this structure.
- */
-struct ccddevice {
- struct vnode **ccd_vpp; /* array of component vnodes */
- char **ccd_cpp; /* array of component pathnames */
- int ccd_unit; /* logical unit of this ccd */
- int ccd_interleave; /* interleave (DEV_BSIZE blocks) */
- int ccd_flags; /* misc. information */
- int ccd_ndev; /* number of component devices */
-};
-
-/*
- * This structure is used to configure a ccd via ioctl(2).
- */
-struct ccd_ioctl {
- char **ccio_disks; /* pointer to component paths */
- u_int ccio_ndisks; /* number of disks to concatenate */
- int ccio_ileave; /* interleave (DEV_BSIZE blocks) */
- int ccio_flags; /* misc. information */
- int ccio_unit; /* unit number: use varies */
- size_t ccio_size; /* (returned) size of ccd */
-};
-
-/* ccd_flags */
-#define CCDF_SWAP 0x01 /* interleave should be dmmax */
-#define CCDF_UNIFORM 0x02 /* use LCCD of sizes for uniform interleave */
-#define CCDF_MIRROR 0x04 /* enable data mirroring */
-#define CCDF_OLD 0x08 /* legacy */
-#define CCDF_BITS \
- "\020\01swap\02uniform\03mirror\04old"
-
-/* Mask of user-settable ccd flags. */
-#define CCDF_USERMASK \
- (CCDF_SWAP|CCDF_UNIFORM|CCDF_MIRROR|CCDF_OLD)
-
-/*
- * Component info table.
- * Describes a single component of a concatenated disk.
- */
-struct ccdcinfo {
- struct vnode *ci_vp; /* device's vnode */
- char *ci_path; /* path to component */
- size_t ci_size; /* size */
- size_t ci_pathlen; /* length of component path */
- dev_t ci_dev; /* XXX: device's dev_t */
- int ci_flags; /* see below */
-};
-
-#define CCIF_FAILED 0x01 /* had a B_ERROR on this one */
-
-/*
- * Interleave description table.
- * Computed at boot time to speed irregular-interleave lookups.
- * The idea is that we interleave in "groups". First we interleave
- * evenly over all component disks up to the size of the smallest
- * component (the first group), then we interleave evenly over all
- * remaining disks up to the size of the next-smallest (second group),
- * and so on.
- *
- * Each table entry describes the interleave characteristics of one
- * of these groups. For example if a concatenated disk consisted of
- * three components of 5, 3, and 7 DEV_BSIZE blocks interleaved at
- * DEV_BSIZE (1), the table would have three entries:
- *
- * ndisk startblk startoff dev
- * 3 0 0 0, 1, 2
- * 2 9 3 0, 2
- * 1 13 5 2
- * 0 - - -
- *
- * which says that the first nine blocks (0-8) are interleaved over
- * 3 disks (0, 1, 2) starting at block offset 0 on any component disk,
- * the next 4 blocks (9-12) are interleaved over 2 disks (0, 2) starting
- * at component block 3, and the remaining blocks (13-14) are on disk
- * 2 starting at offset 5.
- */
-struct ccdiinfo {
- daddr64_t ii_startblk; /* starting scaled block # for range */
- daddr64_t ii_startoff; /* starting component offset (block #) */
- int *ii_index; /* ordered list of components in range */
- int *ii_parity; /* list of parity shifts */
- int ii_ndisk; /* # of disks range is interleaved over */
-};
-
-/*
- * Concatenated disk pseudo-geometry information.
- */
-struct ccdgeom {
- u_int32_t ccg_secsize; /* # bytes per sector */
- u_int32_t ccg_nsectors; /* # data sectors per track */
- u_int32_t ccg_ntracks; /* # tracks per cylinder */
- u_int32_t ccg_ncylinders; /* # cylinders per unit */
- u_int16_t ccg_rpm;
-};
-
-/*
- * Before you can use a unit, it must be configured with CCDIOCSET.
- * The configuration persists across opens and closes of the device;
- * a CCDIOCCLR must be used to reset a configuration. An attempt to
- * CCDIOCSET an already active unit will return EBUSY. Attempts to
- * CCDIOCCLR an inactive unit will return ENXIO.
- */
-#define CCDIOCSET _IOWR('F', 16, struct ccd_ioctl) /* enable ccd */
-#define CCDIOCCLR _IOW('F', 17, struct ccd_ioctl) /* disable ccd */
diff --git a/sys/sys/conf.h b/sys/sys/conf.h
index f68f068e843..16ce3d9af44 100644
--- a/sys/sys/conf.h
+++ b/sys/sys/conf.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: conf.h,v 1.117 2011/10/06 09:14:35 mikeb Exp $ */
+/* $OpenBSD: conf.h,v 1.118 2011/10/06 20:49:28 deraadt Exp $ */
/* $NetBSD: conf.h,v 1.33 1996/05/03 20:03:32 christos Exp $ */
/*-
@@ -600,9 +600,6 @@ bdev_decl(sw);
bdev_decl(vnd);
cdev_decl(vnd);
-bdev_decl(ccd);
-cdev_decl(ccd);
-
bdev_decl(raid);
cdev_decl(raid);
diff --git a/usr.bin/kdump/Makefile b/usr.bin/kdump/Makefile
index da50c9f7173..d3efeb6ab4e 100644
--- a/usr.bin/kdump/Makefile
+++ b/usr.bin/kdump/Makefile
@@ -1,4 +1,4 @@
-# $OpenBSD: Makefile,v 1.20 2011/06/25 19:00:41 deraadt Exp $
+# $OpenBSD: Makefile,v 1.21 2011/10/06 20:49:28 deraadt Exp $
LDSTATIC=${STATIC}
PROG= kdump
@@ -13,7 +13,6 @@ ioctl.c: ${.CURDIR}/Makefile ${.CURDIR}/mkioctls
/usr/include/sys/ioctl_compat.h \
/usr/include/crypto/cryptodev.h \
/usr/include/dev/biovar.h \
- /usr/include/dev/ccdvar.h \
/usr/include/dev/systrace.h \
/usr/include/dev/wscons/wsconsio.h \
/usr/include/dev/vndioctl.h \
diff --git a/usr.bin/kdump/mkioctls b/usr.bin/kdump/mkioctls
index 2357d6d8012..40e0ffe5a21 100644
--- a/usr.bin/kdump/mkioctls
+++ b/usr.bin/kdump/mkioctls
@@ -1,5 +1,5 @@
#!/bin/sh -
-# $OpenBSD: mkioctls,v 1.25 2011/06/25 19:00:41 deraadt Exp $
+# $OpenBSD: mkioctls,v 1.26 2011/10/06 20:49:28 deraadt Exp $
#
# Copyright (c) 1994
@@ -75,7 +75,6 @@ BEGIN {
print "#include <sys/scsiio.h>"
print "#include <crypto/cryptodev.h>"
print "#include <dev/biovar.h>"
- print "#include <dev/ccdvar.h>"
print "#include <dev/systrace.h>"
print "#include <dev/wscons/wsconsio.h>"
print "#include <dev/vndioctl.h>"