From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) (using TLSv1 with cipher CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 942F21A1E30 for ; Mon, 17 Oct 2016 09:25:14 -0700 (PDT) Received: from orsmga001.jf.intel.com ([10.7.209.18]) by fmsmga101.fm.intel.com with ESMTP; 17 Oct 2016 09:25:14 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.31,357,1473145200"; d="scan'208";a="1045891646" Received: from fmsmsx105.amr.corp.intel.com ([10.18.124.203]) by orsmga001.jf.intel.com with ESMTP; 17 Oct 2016 09:25:15 -0700 Received: from fmsmsx103.amr.corp.intel.com ([169.254.2.167]) by FMSMSX105.amr.corp.intel.com ([169.254.4.150]) with mapi id 14.03.0248.002; Mon, 17 Oct 2016 09:25:13 -0700 From: "Carsey, Jaben" To: "Ni, Ruiyu" , "edk2-devel@lists.01.org" CC: "Kinney, Michael D" , "Yao, Jiewen" , "Carsey, Jaben" Thread-Topic: [edk2] [PATCH 1/5] ShellPkg: Move SHELL_FREE_NON_NULL from ShellBase.h to ShellLib.h Thread-Index: AQHSJf+eJpK9OfutUU+FDxxviEtJ16Cs2gHA Date: Mon, 17 Oct 2016 16:25:12 +0000 Message-ID: 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 X-MS-Has-Attach: X-MS-TNEF-Correlator: x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiMzQ5MWVmNTQtMWZlNi00NDkyLTkxNmUtNmI4Y2MzZmEzYWI5IiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX0lDIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE1LjkuNi42IiwiVHJ1c3RlZExhYmVsSGFzaCI6IkF0NmlLTkhxbmZUaGc3K3JGRUdKaGJBNmtoK2VBQ3JLM25qQms1RTFCMDQ9In0= x-ctpclassification: CTP_IC x-originating-ip: [10.1.200.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: Mon, 17 Oct 2016 16:25:14 -0000 Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Reviewed-by: Jaben Carsey > -----Original Message----- > From: edk2-devel [mailto:edk2-devel-bounces@lists.01.org] On Behalf Of > Ruiyu Ni > Sent: Friday, October 14, 2016 2:44 AM > To: edk2-devel@lists.01.org > Cc: Carsey, Jaben ; Kinney, Michael D > ; Yao, Jiewen > Subject: [edk2] [PATCH 1/5] ShellPkg: Move SHELL_FREE_NON_NULL from > ShellBase.h to ShellLib.h > Importance: High >=20 > The more proper place for macro SHELL_FREE_NON_NULL is ShellLib.h > instead of ShellBase.h. >=20 > Modify Compress.c to resolve build failure due to this change. >=20 > 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(-) >=20 > 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 > applications. >=20 > - Copyright (c) 2006 - 2015, Intel Corporation. All rights reserved.
> + Copyright (c) 2006 - 2016, 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 > @@ -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 > bytes) > #define MAX_FILE_NAME_LEN 512 >=20 > diff --git a/ShellPkg/Include/ShellBase.h b/ShellPkg/Include/ShellBase.h > index 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_RET= URN > type >=20 > - Copyright (c) 2009 - 2011, Intel Corporation. All rights reserved.
> + Copyright (c) 2009 - 2016, 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 > @@ -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/ShellPkg/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 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 > @@ -17,12 +17,12 @@ > WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER > EXPRESS OR IMPLIED. >=20 > **/ > - > +#include > +#include > #include > #include > #include > -#include > -#include > +#include >=20 > // > // Macro Definitions > -- > 2.9.0.windows.1 >=20 > _______________________________________________ > edk2-devel mailing list > edk2-devel@lists.01.org > https://lists.01.org/mailman/listinfo/edk2-devel