Module Name: src
Committed By: tsutsui
Date: Sun Oct 13 15:32:14 UTC 2013
Modified Files:
src/distrib/utils/sysinst: mbr.c
Log Message:
Fix another botch of my dumb patch in PR/45990; add missing braces.
The offset of MBR partition 0 was unintentionally set to 2048 even on
small (<=128GB) disks. Probably we should rethink the threshold,
but anyway sysinst(8) should follow fdisk(8) default.
http://nxr.NetBSD.org/xref/src/sbin/fdisk/fdisk.c?r=1.145#1199
http://cvsweb.NetBSD.org/bsdweb.cgi/src/sbin/fdisk/fdisk.c#rev1.129
The problem is pointed out and analyzed by Simon Nicolussi in PR/48304.
Should be pulled up to all netbsd-6* branches.
To generate a diff of this commit:
cvs rdiff -u -r1.91 -r1.92 src/distrib/utils/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/distrib/utils/sysinst/mbr.c
diff -u src/distrib/utils/sysinst/mbr.c:1.91 src/distrib/utils/sysinst/mbr.c:1.92
--- src/distrib/utils/sysinst/mbr.c:1.91 Sat May 26 05:09:59 2012
+++ src/distrib/utils/sysinst/mbr.c Sun Oct 13 15:32:14 2013
@@ -1,4 +1,4 @@
-/* $NetBSD: mbr.c,v 1.91 2012/05/26 05:09:59 tsutsui Exp $ */
+/* $NetBSD: mbr.c,v 1.92 2013/10/13 15:32:14 tsutsui Exp $ */
/*
* Copyright 1997 Piermont Information Systems Inc.
@@ -1890,8 +1890,9 @@ get_ptn_alignment(struct mbr_partition *
}
} else {
/* Use 1MB offset for large (>128GB) disks */
- if (dlsize > 2048 * 1024 * 128)
+ if (dlsize > 2048 * 1024 * 128) {
ptn_alignment = 2048;
ptn_0_offset = 2048;
+ }
}
}