Module Name:    src
Committed By:   nonaka
Date:           Tue Mar 20 10:21:01 UTC 2018

Modified Files:
        src/sys/arch/i386/stand/lib: biosdisk.c

Log Message:
efiboot: fix to find boot partition process.

NetBSD related partitions with no bootme flag set are also candidates
for boot partition.


To generate a diff of this commit:
cvs rdiff -u -r1.47 -r1.48 src/sys/arch/i386/stand/lib/biosdisk.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/arch/i386/stand/lib/biosdisk.c
diff -u src/sys/arch/i386/stand/lib/biosdisk.c:1.47 src/sys/arch/i386/stand/lib/biosdisk.c:1.48
--- src/sys/arch/i386/stand/lib/biosdisk.c:1.47	Thu Mar  8 10:34:33 2018
+++ src/sys/arch/i386/stand/lib/biosdisk.c	Tue Mar 20 10:21:01 2018
@@ -1,4 +1,4 @@
-/*	$NetBSD: biosdisk.c,v 1.47 2018/03/08 10:34:33 nonaka Exp $	*/
+/*	$NetBSD: biosdisk.c,v 1.48 2018/03/20 10:21:01 nonaka Exp $	*/
 
 /*
  * Copyright (c) 1996, 1998
@@ -802,20 +802,21 @@ biosdisk_findpartition(int biosdev, dadd
 			if (d->part[partition].fstype == FS_UNUSED)
 				continue;
 #ifdef EFIBOOT
-			if (d->part[partition].attr & GPT_ENT_ATTR_BOOTME) {
-				switch (d->part[partition].fstype) {
-				case FS_BSDFFS:
-				case FS_BSDLFS:
-				case FS_RAID:
-				case FS_CCD:
-				case FS_CGD:
-				case FS_ISO9660:
-					break;
+			switch (d->part[partition].fstype) {
+			case FS_BSDFFS:
+			case FS_BSDLFS:
+			case FS_RAID:
+			case FS_CCD:
+			case FS_CGD:
+			case FS_ISO9660:
+				if (d->part[partition].attr & GPT_ENT_ATTR_BOOTME)
+					goto found;
+				candidate = partition;
+				break;
 
-				default:
+			default:
+				if (d->part[partition].attr & GPT_ENT_ATTR_BOOTME)
 					candidate = partition;
-					continue;
-				}
 				break;
 			}
 #else
@@ -824,6 +825,7 @@ biosdisk_findpartition(int biosdev, dadd
 #endif
 		}
 #ifdef EFIBOOT
+found:
 		if (partition == 0 && candidate != 0)
 			partition = candidate;
 #endif

Reply via email to