ShellPkg: Move SHELL_FREE_NON_NULL from ShellBase.h to ShellLib.h
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>
This commit is contained in:
@ -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
|
||||
|
||||
|
Reference in New Issue
Block a user