public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: "Carsey, Jaben" <jaben.carsey@intel.com>
To: "Ni, Ruiyu" <ruiyu.ni@intel.com>,
	"edk2-devel@lists.01.org" <edk2-devel@lists.01.org>
Cc: "Kinney, Michael D" <michael.d.kinney@intel.com>,
	"Yao, Jiewen" <jiewen.yao@intel.com>,
	"Carsey, Jaben" <jaben.carsey@intel.com>
Subject: Re: [PATCH 1/5] ShellPkg: Move SHELL_FREE_NON_NULL from ShellBase.h to ShellLib.h
Date: Mon, 17 Oct 2016 16:25:12 +0000	[thread overview]
Message-ID: <CB6E33457884FA40993F35157061515C54A90DCD@FMSMSX103.amr.corp.intel.com> (raw)
In-Reply-To: <20161014094431.473584-2-ruiyu.ni@intel.com>

Reviewed-by: Jaben Carsey <jaben.carsey@intel.com>

> -----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 <jaben.carsey@intel.com>; Kinney, Michael D
> <michael.d.kinney@intel.com>; Yao, Jiewen <jiewen.yao@intel.com>
> Subject: [edk2] [PATCH 1/5] ShellPkg: Move SHELL_FREE_NON_NULL from
> ShellBase.h to ShellLib.h
> Importance: High
> 
> The more proper place for macro SHELL_FREE_NON_NULL is ShellLib.h
> instead of 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 <ruiyu.ni@intel.com>
> Cc: Jaben Carsey <jaben.carsey@intel.com>
> Cc: Jiewen Yao <jiewen.yao@intel.com>
> Cc: Michael D Kinney <michael.d.kinney@intel.com>
> ---
>  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
> applications.
> 
> -  Copyright (c) 2006 - 2015, Intel Corporation. All rights reserved.<BR>
> +  Copyright (c) 2006 - 2016, Intel Corporation. All rights reserved.<BR>
>    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 <Protocol/EfiShell.h>
>  #include <Protocol/EfiShellParameters.h>
> 
> +#define SHELL_FREE_NON_NULL(Pointer)  \
> +  do {                                \
> +    if ((Pointer) != NULL) {          \
> +      FreePool((Pointer));            \
> +      (Pointer) = NULL;               \
> +    }                                 \
> +  } while(FALSE)
> +
>  // (20 * (6+5+2))+1) unicode characters from EFI FAT spec (doubled for
> bytes)
>  #define MAX_FILE_NAME_LEN 512
> 
> 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_RETURN
> type
> 
> -  Copyright (c) 2009 - 2011, Intel Corporation. All rights reserved.<BR>
> +  Copyright (c) 2009 - 2016, Intel Corporation. All rights reserved.<BR>
>    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 @@
> 
>  typedef VOID *SHELL_FILE_HANDLE;
> 
> -#define SHELL_FREE_NON_NULL(Pointer)  \
> -  do {                                \
> -    if ((Pointer) != NULL) {          \
> -      FreePool((Pointer));            \
> -      (Pointer) = 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.
> 
> -  Copyright (c) 2007 - 2014, Intel Corporation. All rights reserved.<BR>
> +  Copyright (c) 2007 - 2016, Intel Corporation. All rights reserved.<BR>
>    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.
> 
>  **/
> -
> +#include <Uefi.h>
> +#include <ShellBase.h>
>  #include <Library/MemoryAllocationLib.h>
>  #include <Library/BaseMemoryLib.h>
>  #include <Library/DebugLib.h>
> -#include <ShellBase.h>
> -#include <Uefi.h>
> +#include <Library/ShellLib.h>
> 
>  //
>  // Macro Definitions
> --
> 2.9.0.windows.1
> 
> _______________________________________________
> edk2-devel mailing list
> edk2-devel@lists.01.org
> https://lists.01.org/mailman/listinfo/edk2-devel


  parent reply	other threads:[~2016-10-17 16:25 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-10-14  9:44 [PATCH 0/5] Move Shell protocol definitions to MdePkg Ruiyu Ni
2016-10-14  9:44 ` [PATCH 1/5] ShellPkg: Move SHELL_FREE_NON_NULL from ShellBase.h to ShellLib.h Ruiyu Ni
2016-10-14 16:22   ` Tim Lewis
2016-10-17 16:25   ` Carsey, Jaben [this message]
2016-10-14  9:44 ` [PATCH 2/5] MdePkg: Include Shell/ShellDynamicCommand/ShellParameters definitions Ruiyu Ni
2016-10-17 18:02   ` Carsey, Jaben
2016-10-18  5:56     ` Ni, Ruiyu
2016-10-18  5:59       ` Kinney, Michael D
2016-10-18 15:19         ` Brian J. Johnson
2016-10-14  9:44 ` [PATCH 3/5] ArmPkg/LinuxLoader: Reference Shell protocols in MdePkg Ruiyu Ni
2016-10-14 19:55   ` Leif Lindholm
2016-10-14  9:44 ` [PATCH 4/5] EmbeddedPkg/FdtPlatformDxe: " Ruiyu Ni
2016-10-14 19:55   ` Leif Lindholm
2016-10-14  9:44 ` [PATCH 5/5] ShellPkg: Remove Shell/ShellDynamicCommand/ShellParameter definitions Ruiyu Ni
2016-10-14 13:08 ` [PATCH 0/5] Move Shell protocol definitions to MdePkg Yao, Jiewen
2016-10-14 13:13   ` Yao, Jiewen
2016-10-14 16:21     ` Tim Lewis
2016-10-15 13:29       ` Yao, Jiewen
2016-10-17 16:30         ` Carsey, Jaben

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-list from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CB6E33457884FA40993F35157061515C54A90DCD@FMSMSX103.amr.corp.intel.com \
    --to=devel@edk2.groups.io \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox