summaryrefslogtreecommitdiffstats
path: root/sys/boot/efi
diff options
context:
space:
mode:
authormanu <manu@FreeBSD.org>2016-06-17 17:09:22 +0000
committermanu <manu@FreeBSD.org>2016-06-17 17:09:22 +0000
commit77df583dbf83764e6675fda65b0fe04219715978 (patch)
tree7a61ff3185cb5de4ec5c0c016cb24855596efdee /sys/boot/efi
parented196aecde5979b90ef9a1abe8623031820325ab (diff)
downloadFreeBSD-src-77df583dbf83764e6675fda65b0fe04219715978.zip
FreeBSD-src-77df583dbf83764e6675fda65b0fe04219715978.tar.gz
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
Diffstat (limited to 'sys/boot/efi')
-rw-r--r--sys/boot/efi/libefi/efipart.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/sys/boot/efi/libefi/efipart.c b/sys/boot/efi/libefi/efipart.c
index 87e38de..aadacf0 100644
--- a/sys/boot/efi/libefi/efipart.c
+++ b/sys/boot/efi/libefi/efipart.c
@@ -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);
}
OpenPOWER on IntegriCloud