From fa6297750be6a477695b4004688ec8a647c90f18 Mon Sep 17 00:00:00 2001 From: Theo de Raadt Date: Fri, 8 Jun 2007 05:35:33 +0000 Subject: 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 --- sys/arch/vax/mscp/mscp_disk.c | 3 ++- sys/arch/vax/vsa/hdc9224.c | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) (limited to 'sys/arch') 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); } -- cgit v1.2.3