Source-Changes-HG archive

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

[src/trunk]: src/usr.sbin/sysinst Do not force alignment of the first partiti...



details:   https://anonhg.NetBSD.org/src/rev/028710cf8a07
branches:  trunk
changeset: 941530:028710cf8a07
user:      martin <martin%NetBSD.org@localhost>
date:      Fri Oct 23 19:02:58 2020 +0000

description:
Do not force alignment of the first partition by default (which is
treated special to skip the first track), unless an existing partition
table hints at it.

diffstat:

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

diffs (28 lines):

diff -r df4efd971c2f -r 028710cf8a07 usr.sbin/sysinst/mbr.c
--- a/usr.sbin/sysinst/mbr.c    Fri Oct 23 18:36:09 2020 +0000
+++ b/usr.sbin/sysinst/mbr.c    Fri Oct 23 19:02:58 2020 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: mbr.c,v 1.36 2020/10/12 16:14:32 martin Exp $ */
+/*     $NetBSD: mbr.c,v 1.37 2020/10/23 19:02:58 martin Exp $ */
 
 /*
  * Copyright 1997 Piermont Information Systems Inc.
@@ -889,16 +889,15 @@
        if (parts->dp.disk_size < 0)
                return;
 
+       parts->ptn_0_offset = parts->geo_sec;
+
        /* Use 1MB offset/alignemnt for large (>128GB) disks */
        if (parts->dp.disk_size > HUGE_DISK_SIZE) {
                parts->ptn_alignment = 2048;
-               parts->ptn_0_offset = 2048;
        } else if (parts->dp.disk_size > TINY_DISK_SIZE) {
                parts->ptn_alignment = 64;
-               parts->ptn_0_offset = parts->geo_sec;
        } else {
                parts->ptn_alignment = 1;
-               parts->ptn_0_offset = parts->geo_sec;
        }
        parts->ext_ptn_alignment = track;
 }



Home | Main Index | Thread Index | Old Index