From owner-svn-src-head@freebsd.org Fri Aug 3 08:32:25 2018 Return-Path: Delivered-To: svn-src-head@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 81CD01061D90 for ; Fri, 3 Aug 2018 08:32:25 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-it0-x231.google.com (mail-it0-x231.google.com [IPv6:2607:f8b0:4001:c0b::231]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 1AA9E76A48 for ; Fri, 3 Aug 2018 08:32:24 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: by mail-it0-x231.google.com with SMTP id h23-v6so7300517ita.5 for ; Fri, 03 Aug 2018 01:32:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20150623.gappssmtp.com; s=20150623; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc; bh=cfmM4oxTBQ+Y1kummHlCOFD2vx+QhjOtuyMMwfy+wxo=; b=j8chzhQcXDOjcMPahLKeVybEFaPtOP+f+c4b6KZ8j06QxmCP2MuH3OMcD7u21xHCnH bRFRu1GXhEFve8Dr0D6+QfGcFLzz6+x7xa7dGJVRI9xKl73y0FrnL+k+dKWVoexvugs0 bKlmWt/E222suIcr5VT9eRmCT16j4OROXFoN/LScIYBRW03TQgOzTbh6NnMax0UsW99p UqgI4FtJOwLYMQrBJofShiOdemtQYZnLbLVovQSwDxbwKnuGIpLK/gjeo8ueye8Judk4 MqWLgutG2Glk4BOWHkJDedCK+Lkgp2TRYidA7ubvhrV+rprIyT5/k6ZxC3pYuP/pYNTU H8bQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:sender:in-reply-to:references:from :date:message-id:subject:to:cc; bh=cfmM4oxTBQ+Y1kummHlCOFD2vx+QhjOtuyMMwfy+wxo=; b=UPP5vzEpea9+g+baUfUPERyh1mAbvxgpEdQZYuQHlKg/m/ygWHU3gIBO6N82JtiWSx Hvpqt+HdhstCRPafFG7pb9FArvaztdlSWRUxZqEfyN4Ne4GfXqdPGFIclXZTu8m3W24x 6aQTPxRJtK3w1HpXpHUZt6RztR5gbNfCEqQpb9q7IXpDeWWV+UtNNFJ+Y43gnlmRL75d aiJI70eDMmYNmQMKnlGTLHrrZOFu8Yf6Lt5zM2eN2MPFHlCybXbdNa+RR9d+L6HiHKGp ly9zNHi6x4Zy7ROOK/NQ8i8f3oD1w//HMqjCHveJSxwd6CLN+JTR3osVJQjpI/Pqhz/L QUjQ== X-Gm-Message-State: AOUpUlGI+SzntRHySqdY1GoBSXLZjJdXB/nht1yRl5ry9/qkdDGvHMJO 4C8WOXXBHSVsPelZnDOvKhOOy+/42EQDuAk2tcvVCQ== X-Google-Smtp-Source: AAOMgpehZSAAUrNdCUZCBIA5kc3EZDE1qQgSgH4iGnUk0Typd28ClXkVU7KMp0iZKsTbi93oINSOvRXqxBfY9GmDEik= X-Received: by 2002:a24:3ec3:: with SMTP id s186-v6mr5507879its.73.1533285144255; Fri, 03 Aug 2018 01:32:24 -0700 (PDT) MIME-Version: 1.0 Sender: wlosh@bsdimp.com Received: by 2002:a4f:4485:0:0:0:0:0 with HTTP; Fri, 3 Aug 2018 01:32:23 -0700 (PDT) X-Originating-IP: [86.153.210.77] In-Reply-To: <201808030759.w737xTwO075764@repo.freebsd.org> References: <201808030759.w737xTwO075764@repo.freebsd.org> From: Warner Losh Date: Fri, 3 Aug 2018 02:32:23 -0600 X-Google-Sender-Auth: wwjR0FQWIRJOqgISWoWlTU1Q2PU Message-ID: Subject: Re: svn commit: r337231 - head/stand/efi/loader To: Toomas Soome Cc: src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.27 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.27 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, 03 Aug 2018 08:32:25 -0000 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. Warner 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 > > Log: > 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: > head/stand/efi/loader/main.c > > Modified: head/stand/efi/loader/main.c > ============================================================ > ================== > --- 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"); > } > > /* > @@ -862,9 +860,9 @@ main(int argc, CHAR16 *argv[]) > * march through the device switch probing for things. > */ > i = efipart_inithandles(); > - if (i != 0) { > + if (i != 0 && i != ENOENT) { > printf("efipart_inithandles failed with ERRNO %d, expect " > - "failures", i); > + "failures\n", i); > } > > for (i = 0; devsw[i] != NULL; i++) > >