summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>1998-02-06 22:17:21 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>1998-02-06 22:17:21 +0000
commit5571360484c931bf2baf536c3b0f9e4fd24c74f1 (patch)
tree53ed8fb32c17bbd8694f45ebb84b2ed20cc01d79
parent837bd2c6b777e11e61125d36e9527aa60eb912e1 (diff)
add FS_CCD, make ccd prefer such partitions. It still accespts FS_BSDFFS, and something will change about that soon
-rw-r--r--share/man/man4/ccd.46
-rw-r--r--sys/dev/ccd.c5
-rw-r--r--sys/sys/disklabel.h5
3 files changed, 11 insertions, 5 deletions
diff --git a/share/man/man4/ccd.4 b/share/man/man4/ccd.4
index 293a9303ad8..d3a845ee159 100644
--- a/share/man/man4/ccd.4
+++ b/share/man/man4/ccd.4
@@ -1,4 +1,4 @@
-.\" $OpenBSD: ccd.4,v 1.7 1997/11/26 22:30:21 niklas Exp $
+.\" $OpenBSD: ccd.4,v 1.8 1998/02/06 22:17:20 deraadt Exp $
.\" $NetBSD: ccd.4,v 1.5 1995/10/09 06:09:09 thorpej Exp $
.\"
.\" Copyright (c) 1994 Jason Downs.
@@ -59,7 +59,9 @@ 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 disklabel and the
.Nm ccd Ns 's
-disklabel. The kernel will only allow component partitions of type FS_BSDFFS.
+disklabel. The kernel wants to only allow component partitions of type FS_CCD,
+but due to disklabel restrictions on some architectures will also accept
+component partitions of FS_BSDFFS.
.Pp
In order to compile in support for the ccd, you must add a line similar
to the following to your kernel configuration file:
diff --git a/sys/dev/ccd.c b/sys/dev/ccd.c
index e4ec4daa468..b82b527106f 100644
--- a/sys/dev/ccd.c
+++ b/sys/dev/ccd.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ccd.c,v 1.33 1998/01/25 09:42:31 niklas Exp $ */
+/* $OpenBSD: ccd.c,v 1.34 1998/02/06 22:17:16 deraadt Exp $ */
/* $NetBSD: ccd.c,v 1.33 1996/05/05 04:21:14 thorpej Exp $ */
/*-
@@ -356,7 +356,8 @@ ccdinit(ccd, cpaths, p)
free(cs->sc_cinfo, M_DEVBUF);
return (error);
}
- if (dpart.part->p_fstype == FS_BSDFFS) {
+ if (dpart.part->p_fstype == FS_CCD ||
+ dpart.part->p_fstype == FS_BSDFFS) {
maxsecsize =
((dpart.disklab->d_secsize > maxsecsize) ?
dpart.disklab->d_secsize : maxsecsize);
diff --git a/sys/sys/disklabel.h b/sys/sys/disklabel.h
index e42ab0359cb..2c01554c954 100644
--- a/sys/sys/disklabel.h
+++ b/sys/sys/disklabel.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: disklabel.h,v 1.13 1997/08/08 21:47:06 niklas Exp $ */
+/* $OpenBSD: disklabel.h,v 1.14 1998/02/06 22:17:18 deraadt Exp $ */
/* $NetBSD: disklabel.h,v 1.41 1996/05/10 23:07:37 mark Exp $ */
/*
@@ -237,6 +237,7 @@ static char *dktypenames[] = {
#define FS_HFS 15 /* Macintosh HFS */
#define FS_ADFS 16 /* Acorn Disk Filing System */
#define FS_EXT2FS 17 /* ext2fs */
+#define FS_CCD 18 /* ccd component */
#ifdef DKTYPENAMES
static char *fstypenames[] = {
@@ -258,6 +259,7 @@ static char *fstypenames[] = {
"HFS",
"ADFS",
"ext2fs",
+ "ccd",
NULL
};
@@ -281,6 +283,7 @@ static char *fstypesnames[] = {
"", /* 15 */
"", /* 16 */
"ext2fs", /* 17 */
+ "", /* 18 */
NULL
};