Module Name: src
Committed By: jdolecek
Date: Mon Jan 7 22:35:55 UTC 2019
Modified Files:
src/sys/dev: dksubr.c
Log Message:
fix the disklabel sanity check coversion for case when both disklabel
and disk geometry are > DEV_BSIZE, such as fictitious cd(4) disklabel
still part of PR kern/53833
To generate a diff of this commit:
cvs rdiff -u -r1.105 -r1.106 src/sys/dev/dksubr.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/sys/dev/dksubr.c
diff -u src/sys/dev/dksubr.c:1.105 src/sys/dev/dksubr.c:1.106
--- src/sys/dev/dksubr.c:1.105 Mon Jan 7 21:04:35 2019
+++ src/sys/dev/dksubr.c Mon Jan 7 22:35:55 2019
@@ -1,4 +1,4 @@
-/* $NetBSD: dksubr.c,v 1.105 2019/01/07 21:04:35 jdolecek Exp $ */
+/* $NetBSD: dksubr.c,v 1.106 2019/01/07 22:35:55 jdolecek Exp $ */
/*-
* Copyright (c) 1996, 1997, 1998, 1999, 2002, 2008 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: dksubr.c,v 1.105 2019/01/07 21:04:35 jdolecek Exp $");
+__KERNEL_RCSID(0, "$NetBSD: dksubr.c,v 1.106 2019/01/07 22:35:55 jdolecek Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -936,7 +936,7 @@ dk_getdisklabel(struct dk_softc *dksc, d
lpratio = dgratio = 1;
if (lp->d_secsize > DEV_BSIZE)
lpratio = lp->d_secsize / DEV_BSIZE;
- else if (dg->dg_secsize > DEV_BSIZE)
+ if (dg->dg_secsize > DEV_BSIZE)
dgratio = dg->dg_secsize / DEV_BSIZE;
/* Sanity check */