Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/dev fix the disklabel sanity check coversion for case wh...



details:   https://anonhg.NetBSD.org/src/rev/ce80fdbba550
branches:  trunk
changeset: 447332:ce80fdbba550
user:      jdolecek <jdolecek%NetBSD.org@localhost>
date:      Mon Jan 07 22:35:55 2019 +0000

description:
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

diffstat:

 sys/dev/dksubr.c |  6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diffs (27 lines):

diff -r ccb2062623a6 -r ce80fdbba550 sys/dev/dksubr.c
--- a/sys/dev/dksubr.c  Mon Jan 07 22:17:02 2019 +0000
+++ b/sys/dev/dksubr.c  Mon Jan 07 22:35:55 2019 +0000
@@ -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 @@
        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 */



Home | Main Index | Thread Index | Old Index