Module Name:    src
Committed By:   sborrill
Date:           Wed Nov  4 13:31:23 UTC 2020

Modified Files:
        src/usr.sbin/sysinst/arch/i386 [netbsd-9]: md.c

Log Message:
Pull up the following revisions(s) (requested by martin in ticket #1120):
        usr.sbin/sysinst/arch/i386/md.c:        revision 1.33

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


To generate a diff of this commit:
cvs rdiff -u -r1.20.2.7 -r1.20.2.8 src/usr.sbin/sysinst/arch/i386/md.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/arch/i386/md.c
diff -u src/usr.sbin/sysinst/arch/i386/md.c:1.20.2.7 src/usr.sbin/sysinst/arch/i386/md.c:1.20.2.8
--- src/usr.sbin/sysinst/arch/i386/md.c:1.20.2.7	Thu Oct 15 19:36:51 2020
+++ src/usr.sbin/sysinst/arch/i386/md.c	Wed Nov  4 13:31:23 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: md.c,v 1.20.2.7 2020/10/15 19:36:51 bouyer Exp $ */
+/*	$NetBSD: md.c,v 1.20.2.8 2020/11/04 13:31:23 sborrill Exp $ */
 
 /*
  * Copyright 1997 Piermont Information Systems Inc.
@@ -573,12 +573,14 @@ md_check_mbr(struct disk_partitions *par
 	}
 
 	/* 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;
 

Reply via email to