Module Name: src Committed By: martin Date: Sat Jun 15 07:57:39 UTC 2019
Modified Files: src/usr.sbin/sysinst: mbr.c Log Message: After deleting all partitions, reset alignment to the values we would have used on an empty disk. To generate a diff of this commit: cvs rdiff -u -r1.11 -r1.12 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.11 src/usr.sbin/sysinst/mbr.c:1.12 --- src/usr.sbin/sysinst/mbr.c:1.11 Wed Jun 12 06:20:17 2019 +++ src/usr.sbin/sysinst/mbr.c Sat Jun 15 07:57:38 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: mbr.c,v 1.11 2019/06/12 06:20:17 martin Exp $ */ +/* $NetBSD: mbr.c,v 1.12 2019/06/15 07:57:38 martin Exp $ */ /* * Copyright 1997 Piermont Information Systems Inc. @@ -1684,6 +1684,15 @@ mbr_delete_all(struct disk_partitions *a #ifdef BOOTSEL memset(&mbri->mbrb, 0, sizeof mbri->mbrb); #endif + + /* + * We may have changed alignment settings due to partitions + * ending on an MB boundary - undo that, now that the partitions + * are gone. + */ + mbr_change_disk_geom(arg, myparts->geo_cyl, myparts->geo_head, + myparts->geo_sec); + return true; }