]> git.proxmox.com Git - mirror_edk2.git/commitdiff
ShellPkg: Move SHELL_FREE_NON_NULL from ShellBase.h to ShellLib.h
authorRuiyu Ni <ruiyu.ni@intel.com>
Fri, 14 Oct 2016 07:59:53 +0000 (15:59 +0800)
committerRuiyu Ni <ruiyu.ni@intel.com>
Wed, 19 Oct 2016 02:24:36 +0000 (10:24 +0800)
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>
Reviewed-by: 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
ShellPkg/Include/ShellBase.h
ShellPkg/Library/UefiShellDebug1CommandsLib/Compress.c

index fe4b9cf785ee60bdb1fa79d939d4493ec737e11c..fafa041bc727a4bc93d0d6b93be9b00de35d1329 100644 (file)
@@ -1,7 +1,7 @@
 /** @file\r
   Provides interface to shell functionality for shell commands and applications.\r
 \r
-  Copyright (c) 2006 - 2015, Intel Corporation. All rights reserved.<BR>\r
+  Copyright (c) 2006 - 2016, Intel Corporation. All rights reserved.<BR>\r
   This program and the accompanying materials\r
   are licensed and made available under the terms and conditions of the BSD License\r
   which accompanies this distribution.  The full text of the license may be found at\r
 #include <Protocol/EfiShell.h>\r
 #include <Protocol/EfiShellParameters.h>\r
 \r
+#define SHELL_FREE_NON_NULL(Pointer)  \\r
+  do {                                \\r
+    if ((Pointer) != NULL) {          \\r
+      FreePool((Pointer));            \\r
+      (Pointer) = NULL;               \\r
+    }                                 \\r
+  } while(FALSE)\r
+\r
 // (20 * (6+5+2))+1) unicode characters from EFI FAT spec (doubled for bytes)\r
 #define MAX_FILE_NAME_LEN 512\r
 \r
index 09f87b4cc0942e1ea200980639e8269df4d54e2a..4b7a3d1e9349d834329a084ebbfaa6d8439368a3 100644 (file)
@@ -1,7 +1,7 @@
 /** @file\r
   Root include file for Shell Package modules that utilize the SHELL_RETURN type\r
 \r
-  Copyright (c) 2009 - 2011, Intel Corporation. All rights reserved.<BR>\r
+  Copyright (c) 2009 - 2016, Intel Corporation. All rights reserved.<BR>\r
   This program and the accompanying materials\r
   are licensed and made available under the terms and conditions of the BSD License\r
   which accompanies this distribution.  The full text of the license may be found at\r
 \r
 typedef VOID *SHELL_FILE_HANDLE;\r
 \r
-#define SHELL_FREE_NON_NULL(Pointer)  \\r
-  do {                                \\r
-    if ((Pointer) != NULL) {          \\r
-      FreePool((Pointer));            \\r
-      (Pointer) = NULL;               \\r
-    }                                 \\r
-  } while(FALSE)\r
-\r
 typedef enum {\r
 ///\r
 /// The operation completed successfully.\r
index dda2fed33ed4a9e5ec50b4925169b9e087b6ae07..da8e6471ca429953d1d3b483a0665485e02368ca 100644 (file)
@@ -7,7 +7,7 @@
   This sequence is further divided into Blocks and Huffman codings\r
   are applied to each Block.\r
 \r
-  Copyright (c) 2007 - 2014, Intel Corporation. All rights reserved.<BR>\r
+  Copyright (c) 2007 - 2016, Intel Corporation. All rights reserved.<BR>\r
   This program and the accompanying materials\r
   are licensed and made available under the terms and conditions of the BSD License\r
   which accompanies this distribution.  The full text of the license may be found at\r
   WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
 \r
 **/\r
-\r
+#include <Uefi.h>\r
+#include <ShellBase.h>\r
 #include <Library/MemoryAllocationLib.h>\r
 #include <Library/BaseMemoryLib.h>\r
 #include <Library/DebugLib.h>\r
-#include <ShellBase.h>\r
-#include <Uefi.h>\r
+#include <Library/ShellLib.h>\r
 \r
 //\r
 // Macro Definitions\r