Module Name: src
Committed By: martin
Date: Fri Oct 23 19:02:58 UTC 2020
Modified Files:
src/usr.sbin/sysinst: mbr.c
Log Message:
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.
To generate a diff of this commit:
cvs rdiff -u -r1.36 -r1.37 src/usr.sbin/sysinst/mbr.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/usr.sbin/sysinst/mbr.c
diff -u src/usr.sbin/sysinst/mbr.c:1.36 src/usr.sbin/sysinst/mbr.c:1.37
--- src/usr.sbin/sysinst/mbr.c:1.36 Mon Oct 12 16:14:32 2020
+++ src/usr.sbin/sysinst/mbr.c Fri Oct 23 19:02:58 2020
@@ -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 @@ mbr_init_default_alignments(struct mbr_d
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;
}