From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from msmail.insydesw.com.tw (ms.insydesw.com [211.75.113.220]) (using TLSv1 with cipher AES128-SHA (128/128 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id B33BC1A1E9E for ; Fri, 14 Oct 2016 09:22:37 -0700 (PDT) Received: from msmail.insydesw.com.tw ([fe80::74f7:f173:f4aa:9a05]) by msmail.insydesw.com.tw ([fe80::74f7:f173:f4aa:9a05%11]) with mapi id 14.01.0438.000; Sat, 15 Oct 2016 00:22:36 +0800 From: Tim Lewis To: Ruiyu Ni , "edk2-devel@lists.01.org" CC: Jaben Carsey , Michael D Kinney , Jiewen Yao Thread-Topic: [edk2] [PATCH 1/5] ShellPkg: Move SHELL_FREE_NON_NULL from ShellBase.h to ShellLib.h Thread-Index: AQHSJf+WjKKClhHnHU+x8bHULffR7aCoIj2w Date: Fri, 14 Oct 2016 16:22:35 +0000 Message-ID: <7236196A5DF6C040855A6D96F556A53F3F6C34@msmail.insydesw.com.tw> References: <20161014094431.473584-1-ruiyu.ni@intel.com> <20161014094431.473584-2-ruiyu.ni@intel.com> In-Reply-To: <20161014094431.473584-2-ruiyu.ni@intel.com> Accept-Language: en-US, zh-TW X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [192.168.100.108] MIME-Version: 1.0 Subject: Re: [PATCH 1/5] ShellPkg: Move SHELL_FREE_NON_NULL from ShellBase.h to ShellLib.h 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: Fri, 14 Oct 2016 16:22:38 -0000 Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Glad to see this is finally being done! -----Original Message----- From: edk2-devel [mailto:edk2-devel-bounces@lists.01.org] On Behalf Of Ruiy= u Ni Sent: Friday, October 14, 2016 2:44 AM To: edk2-devel@lists.01.org Cc: Jaben Carsey ; Michael D Kinney ; Jiewen Yao Subject: [edk2] [PATCH 1/5] ShellPkg: Move SHELL_FREE_NON_NULL from ShellBa= se.h to ShellLib.h The more proper place for macro SHELL_FREE_NON_NULL is ShellLib.h instead o= f ShellBase.h. Modify Compress.c to resolve build failure due to this change. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Ruiyu Ni Cc: Jaben Carsey Cc: Jiewen Yao Cc: Michael D Kinney --- ShellPkg/Include/Library/ShellLib.h | 10 +++++++++- ShellPkg/Include/ShellBase.h | 10 +--------- ShellPkg/Library/UefiShellDebug1CommandsLib/Compress.c | 8 ++++---- 3 files changed, 14 insertions(+), 14 deletions(-) diff --git a/ShellPkg/Include/Library/ShellLib.h b/ShellPkg/Include/Library= /ShellLib.h index fe4b9cf..fafa041 100644 --- a/ShellPkg/Include/Library/ShellLib.h +++ b/ShellPkg/Include/Library/ShellLib.h @@ -1,7 +1,7 @@ /** @file Provides interface to shell functionality for shell commands and applica= tions. =20 - Copyright (c) 2006 - 2015, Intel Corporation. All rights reserved.
+ Copyright (c) 2006 - 2016, Intel Corporation. All rights=20 + reserved.
This program and the accompanying materials are licensed and made available under the terms and conditions of the BS= D License which accompanies this distribution. The full text of the license may b= e found at @@ -24,6 +24,14 @@ #include #include =20 +#define SHELL_FREE_NON_NULL(Pointer) \ + do { \ + if ((Pointer) !=3D NULL) { \ + FreePool((Pointer)); \ + (Pointer) =3D NULL; \ + } \ + } while(FALSE) + // (20 * (6+5+2))+1) unicode characters from EFI FAT spec (doubled for byt= es) #define MAX_FILE_NAME_LEN 512 =20 diff --git a/ShellPkg/Include/ShellBase.h b/ShellPkg/Include/ShellBase.h in= dex 09f87b4..4b7a3d1 100644 --- a/ShellPkg/Include/ShellBase.h +++ b/ShellPkg/Include/ShellBase.h @@ -1,7 +1,7 @@ /** @file Root include file for Shell Package modules that utilize the SHELL_RETUR= N type =20 - Copyright (c) 2009 - 2011, Intel Corporation. All rights reserved.
+ Copyright (c) 2009 - 2016, Intel Corporation. All rights=20 + reserved.
This program and the accompanying materials are licensed and made available under the terms and conditions of the BS= D License which accompanies this distribution. The full text of the license may b= e found at @@ -17,14 +17,6 @@ =20 typedef VOID *SHELL_FILE_HANDLE; =20 -#define SHELL_FREE_NON_NULL(Pointer) \ - do { \ - if ((Pointer) !=3D NULL) { \ - FreePool((Pointer)); \ - (Pointer) =3D NULL; \ - } \ - } while(FALSE) - typedef enum { /// /// The operation completed successfully. diff --git a/ShellPkg/Library/UefiShellDebug1CommandsLib/Compress.c b/Shell= Pkg/Library/UefiShellDebug1CommandsLib/Compress.c index dda2fed..da8e647 100644 --- a/ShellPkg/Library/UefiShellDebug1CommandsLib/Compress.c +++ b/ShellPkg/Library/UefiShellDebug1CommandsLib/Compress.c @@ -7,7 +7,7 @@ This sequence is further divided into Blocks and Huffman codings are applied to each Block. =20 - Copyright (c) 2007 - 2014, Intel Corporation. All rights reserved.
+ Copyright (c) 2007 - 2016, Intel Corporation. All rights=20 + reserved.
This program and the accompanying materials are licensed and made available under the terms and conditions of the BS= D License which accompanies this distribution. The full text of the license may b= e found at @@ -17,12 +17,12 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMP= LIED. =20 **/ - +#include +#include #include #include #include -#include -#include +#include =20 // // Macro Definitions -- 2.9.0.windows.1 _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel