From owner-svn-src-all@freebsd.org Fri Aug 3 08:47:12 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7D1A41062639; Fri, 3 Aug 2018 08:47:12 +0000 (UTC) (envelope-from tsoome@me.com) Received: from mr11p00im-asmtp002.me.com (mr11p00im-asmtp002.me.com [17.110.69.253]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 77A88774B5; Fri, 3 Aug 2018 08:47:11 +0000 (UTC) (envelope-from tsoome@me.com) Received: from process-dkim-sign-daemon.mr11p00im-asmtp002.me.com by mr11p00im-asmtp002.me.com (Oracle Communications Messaging Server 8.0.2.2.20180531 64bit (built May 31 2018)) id <0PCV00B00M3TPH00@mr11p00im-asmtp002.me.com>; Fri, 03 Aug 2018 08:46:46 +0000 (GMT) Received: from icloud.com ([127.0.0.1]) by mr11p00im-asmtp002.me.com (Oracle Communications Messaging Server 8.0.2.2.20180531 64bit (built May 31 2018)) with ESMTPSA id <0PCV00BSIN1ABD10@mr11p00im-asmtp002.me.com>; Fri, 03 Aug 2018 08:46:29 +0000 (GMT) X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:,, definitions=2018-08-03_03:,, signatures=0 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 spamscore=0 clxscore=1015 suspectscore=2 malwarescore=0 phishscore=0 adultscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1707230000 definitions=main-1808030098 From: Toomas Soome Message-id: <53D5CC0A-16D1-4538-B818-0B7F6E6CAB69@me.com> MIME-version: 1.0 (Mac OS X Mail 11.5 \(3445.9.1\)) Subject: Re: svn commit: r337231 - head/stand/efi/loader Date: Fri, 03 Aug 2018 11:46:21 +0300 In-reply-to: Cc: Toomas Soome , src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org To: Warner Losh References: <201808030759.w737xTwO075764@repo.freebsd.org> X-Mailer: Apple Mail (2.3445.9.1) Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.27 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 03 Aug 2018 08:47:12 -0000 > On 3 Aug 2018, at 11:32, Warner Losh wrote: >=20 > Any reason why efipart_inithandles() should even return an error in = this case? Seems to cause us nothing but trouble so we have to filter = some, but not all errors which strikes me as a bad design. We should = only return errors for real errors, like not having enough memory for = the arrays we need. >=20 > Warner The current code does return the efi error translated to errno and does = leave the filtering/notification for caller. I guess it is good idea to = filter cases like no devices in-place, however, the fun is with out of = memory =E2=80=94 at that stage (we even haven't started to probe for = disks, so we do not have even interpreter) it basically means loader.efi = failure. rgds, toomas >=20 > On Fri, Aug 3, 2018 at 1:59 AM, Toomas Soome > wrote: > Author: tsoome > Date: Fri Aug 3 07:59:29 2018 > New Revision: 337231 > URL: https://svnweb.freebsd.org/changeset/base/337231 = >=20 > Log: > loader.efi: clean up misleading noise from missing block devices >=20 > If there are no block devices, there is no need to printout > error (ENOENT). >=20 > In case of netboot, our image path has no block device, no need to = make > noise about it. >=20 > Modified: > head/stand/efi/loader/main.c >=20 > Modified: head/stand/efi/loader/main.c > = =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D > --- head/stand/efi/loader/main.c Fri Aug 3 02:51:37 2018 = (r337230) > +++ head/stand/efi/loader/main.c Fri Aug 3 07:59:29 2018 = (r337231) > @@ -545,8 +545,6 @@ find_currdev(EFI_LOADED_IMAGE *img, bool = do_bootmgr, b > return (0); > } > } > - } else { > - printf("Can't find device by handle\n"); > } >=20 > /* > @@ -862,9 +860,9 @@ main(int argc, CHAR16 *argv[]) > * march through the device switch probing for things. > */ > i =3D efipart_inithandles(); > - if (i !=3D 0) { > + if (i !=3D 0 && i !=3D ENOENT) { > printf("efipart_inithandles failed with ERRNO %d, = expect " > - "failures", i); > + "failures\n", i); > } >=20 > for (i =3D 0; devsw[i] !=3D NULL; i++) >=20 >=20