summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>2007-06-08 05:35:33 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>2007-06-08 05:35:33 +0000
commitfa6297750be6a477695b4004688ec8a647c90f18 (patch)
treebc594950c85ccf3afe275008eb024bb29c6050d0 /sys
parent6734ce8e36b95fafe001d2956bb65942845607be (diff)
all disklabels read from the kernel now always contain a total sector
size which is the REAL DISK SIZE. always. if a driver fails to set this right, please fix it. agreed with otto and krw
Diffstat (limited to 'sys')
-rw-r--r--sys/arch/vax/mscp/mscp_disk.c3
-rw-r--r--sys/arch/vax/vsa/hdc9224.c3
-rw-r--r--sys/isofs/cd9660/cd9660_vfsops.c3
-rw-r--r--sys/isofs/udf/udf_subr.c3
4 files changed, 8 insertions, 4 deletions
diff --git a/sys/arch/vax/mscp/mscp_disk.c b/sys/arch/vax/mscp/mscp_disk.c
index 28bfc85d9bc..a68d996fce6 100644
--- a/sys/arch/vax/mscp/mscp_disk.c
+++ b/sys/arch/vax/mscp/mscp_disk.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: mscp_disk.c,v 1.22 2007/06/07 05:22:32 deraadt Exp $ */
+/* $OpenBSD: mscp_disk.c,v 1.23 2007/06/08 05:35:31 deraadt Exp $ */
/* $NetBSD: mscp_disk.c,v 1.30 2001/11/13 07:38:28 lukem Exp $ */
/*
* Copyright (c) 1996 Ludd, University of Lule}, Sweden.
@@ -875,6 +875,7 @@ rrmakelabel(dl, type)
DL_SETPOFFSET(&dl->d_partitions[0], 0);
DL_SETPOFFSET(&dl->d_partitions[2], 0);
dl->d_interleave = dl->d_headswitch = 1;
+ dl->d_version = 1;
dl->d_magic = dl->d_magic2 = DISKMAGIC;
dl->d_checksum = dkcksum(dl);
}
diff --git a/sys/arch/vax/vsa/hdc9224.c b/sys/arch/vax/vsa/hdc9224.c
index 83f63928c50..8dd093dc719 100644
--- a/sys/arch/vax/vsa/hdc9224.c
+++ b/sys/arch/vax/vsa/hdc9224.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: hdc9224.c,v 1.17 2007/06/07 05:22:32 deraadt Exp $ */
+/* $OpenBSD: hdc9224.c,v 1.18 2007/06/08 05:35:32 deraadt Exp $ */
/* $NetBSD: hdc9224.c,v 1.16 2001/07/26 15:05:09 wiz Exp $ */
/*
* Copyright (c) 1996 Ludd, University of Lule}, Sweden.
@@ -879,6 +879,7 @@ hdmakelabel(struct disklabel *dl, struct hdgeom *g)
DL_SETPOFFSET(&dl->d_partitions[0], 0);
DL_SETPOFFSET(&dl->d_partitions[2], 0);
dl->d_interleave = dl->d_headswitch = 1;
+ lp->d_version = 1;
dl->d_magic = dl->d_magic2 = DISKMAGIC;
dl->d_checksum = dkcksum(dl);
}
diff --git a/sys/isofs/cd9660/cd9660_vfsops.c b/sys/isofs/cd9660/cd9660_vfsops.c
index 3ae09a46f71..0b1d075aba6 100644
--- a/sys/isofs/cd9660/cd9660_vfsops.c
+++ b/sys/isofs/cd9660/cd9660_vfsops.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: cd9660_vfsops.c,v 1.45 2007/06/05 00:38:22 deraadt Exp $ */
+/* $OpenBSD: cd9660_vfsops.c,v 1.46 2007/06/08 05:35:32 deraadt Exp $ */
/* $NetBSD: cd9660_vfsops.c,v 1.26 1997/06/13 15:38:58 pk Exp $ */
/*-
@@ -525,6 +525,7 @@ iso_disklabelspoof(dev, strat, lp)
lp->d_npartitions = RAW_PART + 1;
lp->d_bbsize = 8192; /* fake */
lp->d_sbsize = 64*1024; /* fake */
+ lp->d_version = 1;
lp->d_magic = DISKMAGIC;
lp->d_magic2 = DISKMAGIC;
diff --git a/sys/isofs/udf/udf_subr.c b/sys/isofs/udf/udf_subr.c
index 531c9697b1d..1c24b583be7 100644
--- a/sys/isofs/udf/udf_subr.c
+++ b/sys/isofs/udf/udf_subr.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: udf_subr.c,v 1.12 2007/06/05 00:38:22 deraadt Exp $ */
+/* $OpenBSD: udf_subr.c,v 1.13 2007/06/08 05:35:32 deraadt Exp $ */
/*
* Copyright (c) 2006, Miodrag Vallat
@@ -167,6 +167,7 @@ udf_disklabelspoof(dev_t dev, void (*strat)(struct buf *),
DL_SETPSIZE(&lp->d_partitions[RAW_PART], DL_GETDSIZE(lp));
lp->d_partitions[RAW_PART].p_fstype = FS_UDF;
lp->d_npartitions = RAW_PART + 1;
+ lp->d_version = 1;
lp->d_bbsize = 8192; /* Fake. */
lp->d_sbsize = 64*1024; /* Fake. */