Source-Changes-HG archive

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

[src/trunk]: src/usr.sbin/sysinst/arch/i386 Do not force bootselector MBR cod...



details:   https://anonhg.NetBSD.org/src/rev/b8540c0e9fec
branches:  trunk
changeset: 977406:b8540c0e9fec
user:      martin <martin%NetBSD.org@localhost>
date:      Fri Oct 23 19:03:42 2020 +0000

description:
Do not force bootselector MBR code for installs with only a single named
partition.

diffstat:

 usr.sbin/sysinst/arch/i386/md.c |  8 +++++---
 1 files changed, 5 insertions(+), 3 deletions(-)

diffs (26 lines):

diff -r 4ec52d656248 -r b8540c0e9fec usr.sbin/sysinst/arch/i386/md.c
--- a/usr.sbin/sysinst/arch/i386/md.c   Fri Oct 23 19:02:58 2020 +0000
+++ b/usr.sbin/sysinst/arch/i386/md.c   Fri Oct 23 19:03:42 2020 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: md.c,v 1.32 2020/10/12 16:14:34 martin Exp $ */
+/*     $NetBSD: md.c,v 1.33 2020/10/23 19:03:42 martin Exp $ */
 
 /*
  * Copyright 1997 Piermont Information Systems Inc.
@@ -573,12 +573,14 @@
        }
 
        /* Sort out the name of the mbr code we need */
-       if (names > 0 || fl & (NETBSD_NAMED | ACTIVE_NAMED)) {
+       if (names > 1 ||
+           (parts->num_part > 1 && (fl & (NETBSD_NAMED | ACTIVE_NAMED)))) {
                /* Need bootselect code */
                fl |= MBR_BS_ACTIVE;
                bootcode = fl & MBR_BS_EXTLBA ? _PATH_BOOTEXT : _PATH_BOOTSEL;
-       } else
+       } else {
                bootcode = _PATH_MBR;
+       }
 
        fl &=  MBR_BS_ACTIVE | MBR_BS_EXTLBA;
 



Home | Main Index | Thread Index | Old Index