Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 21 Feb 2019 02:48:38 +0000 (UTC)
From:      Kyle Evans <kevans@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org
Subject:   svn commit: r344410 - stable/11/stand/efi/loader
Message-ID:  <201902210248.x1L2mcJ0086179@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: kevans
Date: Thu Feb 21 02:48:38 2019
New Revision: 344410
URL: https://svnweb.freebsd.org/changeset/base/344410

Log:
  MFC r337131, r337231: stand: efipart fixes
  
  r337131:
  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.
  
  r337231:
  loader.efi: clean up misleading noise from missing block devices
  
  If there are no block devices, there is no need to printout
  error (ENOENT).
  
  In case of netboot, our image path has no block device, no need to make
  noise about it.

Modified:
  stable/11/stand/efi/loader/main.c
Directory Properties:
  stable/11/   (props changed)

Modified: stable/11/stand/efi/loader/main.c
==============================================================================
--- stable/11/stand/efi/loader/main.c	Thu Feb 21 02:46:32 2019	(r344409)
+++ stable/11/stand/efi/loader/main.c	Thu Feb 21 02:48:38 2019	(r344410)
@@ -338,8 +338,6 @@ find_currdev(EFI_LOADED_IMAGE *img)
 					return (0);
 			}
 		}
-	} else {
-		printf("Can't find device by handle\n");
 	}
 
 	/*
@@ -642,12 +640,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 && i != ENOENT) {
+		printf("efipart_inithandles failed with ERRNO %d, expect "
+		    "failures\n", 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?201902210248.x1L2mcJ0086179>