Source-Changes-HG archive

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

[src/trunk]: src/distrib/utils/sysinst if the type of either partition is 0 (...



details:   https://anonhg.NetBSD.org/src/rev/10850b34548a
branches:  trunk
changeset: 535260:10850b34548a
user:      mrg <mrg%NetBSD.org@localhost>
date:      Tue Aug 13 03:58:56 2002 +0000

description:
if the type of either partition is 0 ("unused"), then these partitions
do not overlap.  from Tyler Retzlaff <rtr%wasabisystems.com@localhost> and fixes
PR#12386.

diffstat:

 distrib/utils/sysinst/mbr.c |  9 +++++++--
 1 files changed, 7 insertions(+), 2 deletions(-)

diffs (23 lines):

diff -r 498efe574f00 -r 10850b34548a distrib/utils/sysinst/mbr.c
--- a/distrib/utils/sysinst/mbr.c       Tue Aug 13 03:36:30 2002 +0000
+++ b/distrib/utils/sysinst/mbr.c       Tue Aug 13 03:58:56 2002 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: mbr.c,v 1.27 2002/08/12 02:22:52 grant Exp $ */
+/*     $NetBSD: mbr.c,v 1.28 2002/08/13 03:58:56 mrg Exp $ */
 
 /*
  * Copyright 1997 Piermont Information Systems Inc.
@@ -334,7 +334,12 @@
        int j;
 {
 
-       if (part[i].mbrp_size == 0 || part[j].mbrp_size == 0)
+       /*
+        * If the size or type of either partition is zero, they don't
+        * overlap by definition.
+        */
+       if (part[i].mbrp_size == 0 || part[j].mbrp_size == 0 ||
+           part[i].mbrp_typ == 0 || part[j].mbrp_typ == 0)
                return 0;
 
        return 



Home | Main Index | Thread Index | Old Index