From owner-svn-src-head@freebsd.org Fri Jun 17 17:09:24 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1E67EA786E8; Fri, 17 Jun 2016 17:09:24 +0000 (UTC) (envelope-from manu@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E3A6B29E5; Fri, 17 Jun 2016 17:09:23 +0000 (UTC) (envelope-from manu@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u5HH9Nqa094846; Fri, 17 Jun 2016 17:09:23 GMT (envelope-from manu@FreeBSD.org) Received: (from manu@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u5HH9NB4094845; Fri, 17 Jun 2016 17:09:23 GMT (envelope-from manu@FreeBSD.org) Message-Id: <201606171709.u5HH9NB4094845@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: manu set sender to manu@FreeBSD.org using -f From: Emmanuel Vadot Date: Fri, 17 Jun 2016 17:09:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r301995 - head/sys/boot/efi/libefi X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 17 Jun 2016 17:09:24 -0000 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); }