Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 2 Aug 2018 12:43:40 +0000 (UTC)
From:      Toomas Soome <tsoome@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r337131 - head/stand/efi/loader
Message-ID:  <201808021243.w72Cheef081063@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: tsoome
Date: Thu Aug  2 12:43:40 2018
New Revision: 337131
URL: https://svnweb.freebsd.org/changeset/base/337131

Log:
  loader.efi: efipart_inithandles() failure should not prevent devsw initialization
  
  The efipart_inithandles() can return error code when there are no block devices,
  however, we still should walk and initialize devsw.

Modified:
  head/stand/efi/loader/main.c

Modified: head/stand/efi/loader/main.c
==============================================================================
--- head/stand/efi/loader/main.c	Thu Aug  2 12:39:23 2018	(r337130)
+++ head/stand/efi/loader/main.c	Thu Aug  2 12:43:40 2018	(r337131)
@@ -861,12 +861,15 @@ main(int argc, CHAR16 *argv[])
 	 * Scan the BLOCK IO MEDIA handles then
 	 * march through the device switch probing for things.
 	 */
-	if ((i = efipart_inithandles()) == 0) {
-		for (i = 0; devsw[i] != NULL; i++)
-			if (devsw[i]->dv_init != NULL)
-				(devsw[i]->dv_init)();
-	} else
-		printf("efipart_inithandles failed %d, expect failures", i);
+	i = efipart_inithandles();
+	if (i != 0) {
+		printf("efipart_inithandles failed with ERRNO %d, expect "
+		    "failures", i);
+	}
+
+	for (i = 0; devsw[i] != NULL; i++)
+		if (devsw[i]->dv_init != NULL)
+			(devsw[i]->dv_init)();
 
 	printf("%s\n", bootprog_info);
 	printf("   Command line arguments:");



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201808021243.w72Cheef081063>