From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp.nue.novell.com (smtp.nue.novell.com [195.135.221.5]) (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 D50F081CCF for ; Sun, 15 Jan 2017 22:30:31 -0800 (PST) Received: from GaryWorkstation.apac.novell.com (ip-203-192-156-9.asianetcom.net [203.192.156.9]) by smtp.nue.novell.com with ESMTP (NOT encrypted); Mon, 16 Jan 2017 07:30:27 +0100 From: Gary Lin To: edk2-devel@lists.01.org Cc: Siyuan Fu , Jiaxin Wu Date: Mon, 16 Jan 2017 14:30:10 +0800 Message-Id: <20170116063010.6223-1-glin@suse.com> X-Mailer: git-send-email 2.11.0 Subject: [PATCH] NetworkPkg/TlsAuthConfigDxe: Declare EFIAPI for the ChooseFile handler X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 16 Jan 2017 06:30:32 -0000 The ChooseFile handler, UpdateCAFromFile, has to be EFIAPI or gcc would use the wrong ABI and cause the crash of the firmware. This commit also removes the unnecessary type casting in ChooseFile. Cc: Siyuan Fu Cc: Jiaxin Wu Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Gary Lin --- NetworkPkg/TlsAuthConfigDxe/TlsAuthConfigImpl.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/NetworkPkg/TlsAuthConfigDxe/TlsAuthConfigImpl.c b/NetworkPkg/TlsAuthConfigDxe/TlsAuthConfigImpl.c index 5f04503887..fedfb01be9 100644 --- a/NetworkPkg/TlsAuthConfigDxe/TlsAuthConfigImpl.c +++ b/NetworkPkg/TlsAuthConfigDxe/TlsAuthConfigImpl.c @@ -1218,6 +1218,7 @@ UpdatePage( @retval FALSE Not exit caller function. **/ BOOLEAN +EFIAPI UpdateCAFromFile ( IN EFI_DEVICE_PATH_PROTOCOL *FilePath ) @@ -1728,7 +1729,7 @@ TlsAuthConfigAccessCallback ( CleanUpPage (LabelId, Private); break; case KEY_TLS_AUTH_CONFIG_ENROLL_CERT_FROM_FILE: - ChooseFile( NULL, NULL, (CHOOSE_HANDLER) UpdateCAFromFile, &File); + ChooseFile( NULL, NULL, UpdateCAFromFile, &File); break; case KEY_TLS_AUTH_CONFIG_VALUE_SAVE_AND_EXIT: -- 2.11.0