Source-Changes-HG archive

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

[src/trunk]: src/usr.sbin/sysinst After deleting all partitions, reset alignm...



details:   https://anonhg.NetBSD.org/src/rev/612b9746df96
branches:  trunk
changeset: 452017:612b9746df96
user:      martin <martin%NetBSD.org@localhost>
date:      Sat Jun 15 07:57:38 2019 +0000

description:
After deleting all partitions, reset alignment to the values we would
have used on an empty disk.

diffstat:

 usr.sbin/sysinst/mbr.c |  11 ++++++++++-
 1 files changed, 10 insertions(+), 1 deletions(-)

diffs (25 lines):

diff -r 35710ab1c2d0 -r 612b9746df96 usr.sbin/sysinst/mbr.c
--- a/usr.sbin/sysinst/mbr.c    Sat Jun 15 06:40:34 2019 +0000
+++ b/usr.sbin/sysinst/mbr.c    Sat Jun 15 07:57:38 2019 +0000
@@ -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 @@
 #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;
 }
 



Home | Main Index | Thread Index | Old Index