Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 17 Jun 2016 17:09:23 +0000 (UTC)
From:      Emmanuel Vadot <manu@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r301995 - head/sys/boot/efi/libefi
Message-ID:  <201606171709.u5HH9NB4094845@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: manu
Date: Fri Jun 17 17:09:22 2016
New Revision: 301995
URL: https://svnweb.freebsd.org/changeset/base/301995

Log:
  Print a message when disks are found but no logical partition are
  reported by EFI implementation. This address comment on r301714.
  
  Approved by:	re (gjb), andrew (mentor)
  Differential Revision:	https://reviews.freebsd.org/D6787

Modified:
  head/sys/boot/efi/libefi/efipart.c

Modified: head/sys/boot/efi/libefi/efipart.c
==============================================================================
--- head/sys/boot/efi/libefi/efipart.c	Fri Jun 17 17:01:32 2016	(r301994)
+++ head/sys/boot/efi/libefi/efipart.c	Fri Jun 17 17:09:22 2016	(r301995)
@@ -82,7 +82,7 @@ efipart_init(void) 
 	EFI_HANDLE *hin, *hout, *aliases, handle;
 	EFI_STATUS status;
 	UINTN sz;
-	u_int n, nin, nout;
+	u_int n, nin, nout, nrdisk;
 	int err;
 
 	sz = 0;
@@ -103,6 +103,7 @@ efipart_init(void) 
 	hout = hin + nin;
 	aliases = hout + nin;
 	nout = 0;
+	nrdisk = 0;
 
 	bzero(aliases, nin * sizeof(EFI_HANDLE));
 	pdinfo = malloc(nin * sizeof(*pdinfo));
@@ -120,8 +121,7 @@ efipart_init(void) 
 		if (EFI_ERROR(status))
 			continue;
 		if (!blkio->Media->LogicalPartition) {
-			printf("%s%d isn't a logical partition, skipping\n",
-			    efipart_dev.dv_name, n);
+			nrdisk++;
 			continue;
 		}
 
@@ -156,6 +156,9 @@ efipart_init(void) 
 	bcache_add_dev(npdinfo);
 	err = efi_register_handles(&efipart_dev, hout, aliases, nout);
 	free(hin);
+
+	if (nout == 0 && nrdisk > 0)
+		printf("Found %d disk(s) but no logical partition\n", nrdisk);
 	return (err);
 }
 



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