Source-Changes-HG archive

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

[src/trunk]: src/sbin/disklabel Allow partitions to extend to the end of the ...



details:   https://anonhg.NetBSD.org/src/rev/396f434ae3a4
branches:  trunk
changeset: 472239:396f434ae3a4
user:      abs <abs%NetBSD.org@localhost>
date:      Mon Apr 26 02:05:46 1999 +0000

description:
Allow partitions to extend to the end of the disk, even when
STRICT_CYLINDER_ALIGNMENT defined. This allows existing valid disklabels
to work (including those generated by sysinst).

diffstat:

 sbin/disklabel/disklabel.c |  7 ++++---
 1 files changed, 4 insertions(+), 3 deletions(-)

diffs (28 lines):

diff -r fdf3828ff1a9 -r 396f434ae3a4 sbin/disklabel/disklabel.c
--- a/sbin/disklabel/disklabel.c        Mon Apr 26 01:24:26 1999 +0000
+++ b/sbin/disklabel/disklabel.c        Mon Apr 26 02:05:46 1999 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: disklabel.c,v 1.65 1999/04/09 10:06:18 bouyer Exp $    */
+/*     $NetBSD: disklabel.c,v 1.66 1999/04/26 02:05:46 abs Exp $       */
 
 /*
  * Copyright (c) 1987, 1993
@@ -47,7 +47,7 @@
 static char sccsid[] = "@(#)disklabel.c        8.4 (Berkeley) 5/4/95";
 /* from static char sccsid[] = "@(#)disklabel.c        1.2 (Symmetric) 11/28/85"; */
 #else
-__RCSID("$NetBSD: disklabel.c,v 1.65 1999/04/09 10:06:18 bouyer Exp $");
+__RCSID("$NetBSD: disklabel.c,v 1.66 1999/04/26 02:05:46 abs Exp $");
 #endif
 #endif /* not lint */
 
@@ -1728,7 +1728,8 @@
                        warnx("warning, partition %c: size 0, but offset %d",
                            part, pp->p_offset);
 #ifdef STRICT_CYLINDER_ALIGNMENT
-               if (pp->p_size % lp->d_secpercyl) {
+               if (pp->p_size % lp->d_secpercyl &&
+                           pp->p_size + pp->p_offset != lp->d_secperunit) {
                        warnx("warning, partition %c:"
                              " size %% cylinder-size != 0",
                            part);



Home | Main Index | Thread Index | Old Index