From 6734ce8e36b95fafe001d2956bb65942845607be Mon Sep 17 00:00:00 2001 From: Theo de Raadt Date: Fri, 8 Jun 2007 05:34:29 +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/i386/i386/disksubr.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'sys/arch/i386') diff --git a/sys/arch/i386/i386/disksubr.c b/sys/arch/i386/i386/disksubr.c index 8bad5b3019a..e89d06347b3 100644 --- a/sys/arch/i386/i386/disksubr.c +++ b/sys/arch/i386/i386/disksubr.c @@ -1,4 +1,4 @@ -/* $OpenBSD: disksubr.c,v 1.80 2007/06/07 00:28:17 krw Exp $ */ +/* $OpenBSD: disksubr.c,v 1.81 2007/06/08 05:34:28 deraadt Exp $ */ /* $NetBSD: disksubr.c,v 1.21 1996/05/03 19:42:03 christos Exp $ */ /* @@ -296,6 +296,7 @@ notfat: dkcksum(dlp) != 0) msg = "disk label corrupted"; else { + DL_SETDSIZE(dlp, DL_GETDSIZE(lp)); *lp = *dlp; msg = NULL; break; -- cgit v1.2.3