From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=66.187.233.73; helo=mx1.redhat.com; envelope-from=lersek@redhat.com; receiver=edk2-devel@lists.01.org Received: from mx1.redhat.com (mx3-rdu2.redhat.com [66.187.233.73]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 451B2210F1560 for ; Tue, 3 Jul 2018 08:27:30 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.rdu2.redhat.com [10.11.54.5]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 4A6F08163C5F; Tue, 3 Jul 2018 15:27:29 +0000 (UTC) Received: from lacos-laptop-7.usersys.redhat.com (ovpn-120-222.rdu2.redhat.com [10.10.120.222]) by smtp.corp.redhat.com (Postfix) with ESMTP id 3F51A1C5A3; Tue, 3 Jul 2018 15:27:28 +0000 (UTC) To: Ruiyu Ni , edk2-devel@lists.01.org Cc: Michael Turner References: <20180703063743.373172-1-ruiyu.ni@intel.com> <20180703063743.373172-2-ruiyu.ni@intel.com> From: Laszlo Ersek Message-ID: <5f401669-b7b7-fd09-c91c-ff9cf12d52e2@redhat.com> Date: Tue, 3 Jul 2018 17:27:27 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.7.0 MIME-Version: 1.0 In-Reply-To: <20180703063743.373172-2-ruiyu.ni@intel.com> X-Scanned-By: MIMEDefang 2.79 on 10.11.54.5 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.8]); Tue, 03 Jul 2018 15:27:29 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.8]); Tue, 03 Jul 2018 15:27:29 +0000 (UTC) for IP:'10.11.54.5' DOMAIN:'int-mx05.intmail.prod.int.rdu2.redhat.com' HELO:'smtp.corp.redhat.com' FROM:'lersek@redhat.com' RCPT:'' Subject: Re: [PATCH v3 1/7] MdeModulePkg/PlatformBootManager: Add PlatformBootManagerUnableToBoot X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 03 Jul 2018 15:27:30 -0000 Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit On 07/03/18 08:37, Ruiyu Ni wrote: > The patch adds a new API PlatformBootManagerUnableToBoot()' (1) Unbalanced single quote ('). > to PlatformBootManagerLib. > The new API is provided by platform bds library and is called when > no boot option could be launched. > > Contributed-under: TianoCore Contribution Agreement 1.1 > Signed-off-by: Ruiyu Ni > Cc: Sean Brogan > Cc: Michael Turner > Cc: Laszlo Ersek > Cc: Sunny Wang > --- > MdeModulePkg/Include/Library/PlatformBootManagerLib.h | 13 +++++++++++++ > .../PlatformBootManagerLibNull/PlatformBootManager.c | 19 ++++++++++++++++++- > 2 files changed, 31 insertions(+), 1 deletion(-) > > diff --git a/MdeModulePkg/Include/Library/PlatformBootManagerLib.h b/MdeModulePkg/Include/Library/PlatformBootManagerLib.h > index 65630ce2bb..6e26329043 100644 > --- a/MdeModulePkg/Include/Library/PlatformBootManagerLib.h > +++ b/MdeModulePkg/Include/Library/PlatformBootManagerLib.h > @@ -59,4 +59,17 @@ PlatformBootManagerWaitCallback ( > UINT16 TimeoutRemain > ); > > +/** > + The function is called when no boot option could be launched, > + including platform recovery options and options pointing to applications > + built into firmware volumes. > + > + If this function returns, BDS attempts to enter an infinite loop. > +**/ > +VOID > +EFIAPI > +PlatformBootManagerUnableToBoot ( > + VOID > + ); > + > #endif > diff --git a/MdeModulePkg/Library/PlatformBootManagerLibNull/PlatformBootManager.c b/MdeModulePkg/Library/PlatformBootManagerLibNull/PlatformBootManager.c > index 1390e19097..5a4455ef23 100644 > --- a/MdeModulePkg/Library/PlatformBootManagerLibNull/PlatformBootManager.c > +++ b/MdeModulePkg/Library/PlatformBootManagerLibNull/PlatformBootManager.c > @@ -2,7 +2,7 @@ > This file include all platform action which can be customized > by IBV/OEM. > > -Copyright (c) 2012 - 2015, Intel Corporation. All rights reserved.
> +Copyright (c) 2012 - 2018, Intel Corporation. All rights reserved.
> This program and the accompanying materials > are licensed and made available under the terms and conditions of the BSD License > which accompanies this distribution. The full text of the license may be found at > @@ -65,3 +65,20 @@ PlatformBootManagerWaitCallback ( > { > return; > } > + > +/** > + The function is called when no boot option could be launched, > + including platform recovery options and options pointing to applications > + built into firmware volumes. > + > + If this function returns, BDS attempts to enter an infinite loop. > +**/ > +VOID > +EFIAPI > +PlatformBootManagerUnableToBoot ( > + VOID > + ) > +{ > + return; > +} > + > (2) Do we intentionally add such "return" statements? An empty function body (possibly with a comment) would work as well. I'm fine either way, I'd just like to highlight that there is a TianoCore BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=843 about removing useless "return" statements. I believe we should decide whether such return statements are a good thing for edk2. If they are, we should close #843 as NOTEBUG. If they aren't a good thing, we shouldn't add more of them. Anyway, whatever the decision for (1) and (2) above, I don't think reposting would be necessary just because of them; it should be OK to update the patch before pushing. Reviewed-by: Laszlo Ersek Thanks! Laszlo