MdeModulePkg, MdePkg, NetworkPkg, OvmfPkg, PerformancePkg, ShellPkg: Library Migration.
Move libraries from ShellPkg into MdeModulePkg and MdePkg. The following libraries are being migrated out of ShellPkg in order to make their functionality more widely available. • PathLib: Incorporate into MdePkg/Library/BaseLib • FileHandleLib: MdePkg/Library/UefiFileHandleLib • BaseSortLib: MdeModulePkg/Library/BaseSortLib • UefiSortLib: MdeModulePkg/Library/UefiSortLib Diffs showing file changes are in the attached file, LibMigration.patch. A description of the changes follows: • Move ShellPkg/Include/Library/FileHandleLib.h to MdePkg/Include/Library/FileHandleLib.h • Move ShellPkg/Include/Library/SortLib.h to MdeModulePkg/Include/Library/SortLib.h • Move ShellPkg/Library/BaseSortLib to MdeModulePkg/Library/BaseSortLib • Move ShellPkg/Library/UefiSortLib to MdeModulePkg/Library/UefiSortLib • Move ShellPkg/Library/BasePathLib/BasePathLib.c to MdePkg/Library/BaseLib/FilePaths.c • Merge ShellPkg/Include/Library/PathLib.h into MdePkg/Include/Library/BaseLib.h • Delete ShellPkg/Library/BasePathLib; Includes BasePathLib.c and BasePathLib.inf • NetworkPkg/NetworkPkg.dsc • PerformancePkg.dsc • OvmfPkg/OvmfPkgX64.dsc • OvmfPkg/OvmfPkgIa32X64.dsc • OvmfPkg/OvmfPkgIa32.dsc o Update SortLib and FileHandleLib library classes to point to the new library locations. o Remove PathLib library class and make sure that BaseLib is described. • MdeModulePkg/MdeModulePkg.dec o Add SortLib library class • MdePkg/MdePkg.dec o Add FileHandleLib library class o Add PcdUefiFileHandleLibPrintBufferSize PCD • MdePkg/Library/BaseLib/BaseLib.inf o Add FilePaths.c to [Sources] • MdePkg/Include/Library/BaseLib.h o Update file description to include "file path functions" • ShellPkg/ShellPkg.dsc o Change PACKAGE_GUID to { C1014BB7-4092-43D4-984F-0738EB424DBF } o Update PACKAGE_VERSION to 1.0 o Update SortLib and FileHandleLib library classes to point to the new library locations. o Remove PathLib library class and make sure that BaseLib is described. o Remove ShellPkg/Library/UefiFileHandleLib/UefiFileHandleLib.inf from [Components] • ShellPkg/ShellPkg.dec o Update PLATFORM_VERSION to 1.0 o Remove declarations of the FileHandleLib, SortLib, and PathLib Library Classes o Update comment for the PcdShellPrintBufferSize PCD. • ShellPkg/Library/UefiShellLevel2CommandsLib/UefiShellLevel2CommandsLib.inf • ShellPkg/Application/Shell/Shell.inf o Remove PathLib from [LibraryClasses] • ShellPkg/Library/UefiShellLevel2CommandsLib/UefiShellLevel2CommandsLib.h • ShellPkg/Application/Shell/Shell.h o Remove #include <Library/PathLib.h> • ShellPkg/Library/UefiShellLevel1CommandsLib/UefiShellLevel1CommandsLib.inf o Add PathLib to [LibraryClasses] • ShellPkg/Library/UefiShellLevel1CommandsLib/If.c o Remove #include <Library/PathLib.h> • ShellPkg/Application/ShellSortTestApp/ShellSortTestApp.inf o Add MdeModulePkg/MdeModulePkg.dec to [Packages] • MdeModulePkg/Library/BaseSortLib/BaseSortLib.inf • MdeModulePkg/Library/UefiSortLib/UefiSortLib.inf o Replace ShellPkg.dec with MdeModulePkg.dec in [Packages] • MdeModulePkg/Library/UefiSortLib/UefiSortLib.c o Remove #include <ShellBase.h> o Define USL_FREE_NON_NULL() to replace SHELL_FREE_NON_NULL() Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Daryl McDaniel <daryl.mcdaniel@intel.com> Reviewed-by: Jaben Carsey <jaben.carsey@intel.com> Reviewed-by: Erik Bjorge <erik.c.bjorge@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@16601 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
committed by
darylm503
parent
5d6bf9e229
commit
ae591c14b3
@ -1,7 +1,7 @@
|
|||||||
/** @file
|
/** @file
|
||||||
Library used for sorting and comparison routines.
|
Library used for sorting and comparison routines.
|
||||||
|
|
||||||
Copyright (c) 2009 - 2010, Intel Corporation. All rights reserved. <BR>
|
Copyright (c) 2009 - 2014, Intel Corporation. All rights reserved. <BR>
|
||||||
This program and the accompanying materials
|
This program and the accompanying materials
|
||||||
are licensed and made available under the terms and conditions of the BSD License
|
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
|
which accompanies this distribution. The full text of the license may be found at
|
||||||
@ -11,7 +11,6 @@
|
|||||||
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||||
|
|
||||||
**/
|
**/
|
||||||
|
|
||||||
#ifndef __SORT_LIB_H__
|
#ifndef __SORT_LIB_H__
|
||||||
#define __SORT_LIB_H__
|
#define __SORT_LIB_H__
|
||||||
|
|
@ -1,7 +1,7 @@
|
|||||||
/** @file
|
/** @file
|
||||||
Library used for sorting routines.
|
Library used for sorting routines.
|
||||||
|
|
||||||
Copyright (c) 2009 - 2011, Intel Corporation. All rights reserved. <BR>
|
Copyright (c) 2009 - 2014, Intel Corporation. All rights reserved. <BR>
|
||||||
This program and the accompanying materials
|
This program and the accompanying materials
|
||||||
are licensed and made available under the terms and conditions of the BSD License
|
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
|
which accompanies this distribution. The full text of the license may be found at
|
||||||
@ -11,7 +11,6 @@
|
|||||||
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||||
|
|
||||||
**/
|
**/
|
||||||
|
|
||||||
#include <Uefi.h>
|
#include <Uefi.h>
|
||||||
|
|
||||||
#include <Library/BaseLib.h>
|
#include <Library/BaseLib.h>
|
@ -1,7 +1,7 @@
|
|||||||
## @file
|
## @file
|
||||||
# Library used for sorting routines.
|
# Library used for sorting routines.
|
||||||
#
|
#
|
||||||
# Copyright (c) 2009 - 2010, Intel Corporation. All rights reserved. <BR>
|
# Copyright (c) 2009 - 2014, Intel Corporation. All rights reserved. <BR>
|
||||||
#
|
#
|
||||||
# This program and the accompanying materials
|
# This program and the accompanying materials
|
||||||
# are licensed and made available under the terms and conditions of the BSD License
|
# are licensed and made available under the terms and conditions of the BSD License
|
||||||
@ -30,7 +30,7 @@
|
|||||||
|
|
||||||
[Packages]
|
[Packages]
|
||||||
MdePkg/MdePkg.dec
|
MdePkg/MdePkg.dec
|
||||||
ShellPkg/ShellPkg.dec
|
MdeModulePkg/MdeModulePkg.dec
|
||||||
|
|
||||||
[LibraryClasses]
|
[LibraryClasses]
|
||||||
MemoryAllocationLib
|
MemoryAllocationLib
|
@ -1,7 +1,7 @@
|
|||||||
/** @file
|
/** @file
|
||||||
Library used for sorting routines.
|
Library used for sorting routines.
|
||||||
|
|
||||||
Copyright (c) 2009 - 2011, Intel Corporation. All rights reserved. <BR>
|
Copyright (c) 2009 - 2014, Intel Corporation. All rights reserved. <BR>
|
||||||
This program and the accompanying materials
|
This program and the accompanying materials
|
||||||
are licensed and made available under the terms and conditions of the BSD License
|
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
|
which accompanies this distribution. The full text of the license may be found at
|
||||||
@ -13,7 +13,6 @@
|
|||||||
**/
|
**/
|
||||||
|
|
||||||
#include <Uefi.h>
|
#include <Uefi.h>
|
||||||
#include <ShellBase.h>
|
|
||||||
|
|
||||||
#include <Protocol/UnicodeCollation.h>
|
#include <Protocol/UnicodeCollation.h>
|
||||||
#include <Protocol/DevicePath.h>
|
#include <Protocol/DevicePath.h>
|
||||||
@ -28,6 +27,13 @@
|
|||||||
|
|
||||||
STATIC EFI_UNICODE_COLLATION_PROTOCOL *mUnicodeCollation = NULL;
|
STATIC EFI_UNICODE_COLLATION_PROTOCOL *mUnicodeCollation = NULL;
|
||||||
|
|
||||||
|
#define USL_FREE_NON_NULL(Pointer) \
|
||||||
|
{ \
|
||||||
|
if ((Pointer) != NULL) { \
|
||||||
|
FreePool((Pointer)); \
|
||||||
|
(Pointer) = NULL; \
|
||||||
|
} \
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
Worker function for QuickSorting. This function is identical to PerformQuickSort,
|
Worker function for QuickSorting. This function is identical to PerformQuickSort,
|
||||||
@ -191,8 +197,8 @@ PerformQuickSort (
|
|||||||
@param[in] Buffer2 pointer to second DevicePath pointer to compare
|
@param[in] Buffer2 pointer to second DevicePath pointer to compare
|
||||||
|
|
||||||
@retval 0 Buffer1 equal to Buffer2
|
@retval 0 Buffer1 equal to Buffer2
|
||||||
@return < 0 Buffer1 is less than Buffer2
|
@retval <0 Buffer1 is less than Buffer2
|
||||||
@return > 0 Buffer1 is greater than Buffer2
|
@retval >0 Buffer1 is greater than Buffer2
|
||||||
**/
|
**/
|
||||||
INTN
|
INTN
|
||||||
EFIAPI
|
EFIAPI
|
||||||
@ -253,8 +259,8 @@ DevicePathCompare (
|
|||||||
TextPath2);
|
TextPath2);
|
||||||
}
|
}
|
||||||
|
|
||||||
SHELL_FREE_NON_NULL(TextPath1);
|
USL_FREE_NON_NULL(TextPath1);
|
||||||
SHELL_FREE_NON_NULL(TextPath2);
|
USL_FREE_NON_NULL(TextPath2);
|
||||||
|
|
||||||
return (RetVal);
|
return (RetVal);
|
||||||
}
|
}
|
||||||
@ -266,8 +272,8 @@ DevicePathCompare (
|
|||||||
@param[in] Buffer2 Pointer to second String to compare.
|
@param[in] Buffer2 Pointer to second String to compare.
|
||||||
|
|
||||||
@retval 0 Buffer1 equal to Buffer2.
|
@retval 0 Buffer1 equal to Buffer2.
|
||||||
@return < 0 Buffer1 is less than Buffer2.
|
@retval <0 Buffer1 is less than Buffer2.
|
||||||
@return > 0 Buffer1 is greater than Buffer2.
|
@retval >0 Buffer1 is greater than Buffer2.
|
||||||
**/
|
**/
|
||||||
INTN
|
INTN
|
||||||
EFIAPI
|
EFIAPI
|
||||||
@ -300,8 +306,8 @@ StringNoCaseCompare (
|
|||||||
@param[in] Buffer2 Pointer to second String to compare (CHAR16**).
|
@param[in] Buffer2 Pointer to second String to compare (CHAR16**).
|
||||||
|
|
||||||
@retval 0 Buffer1 equal to Buffer2.
|
@retval 0 Buffer1 equal to Buffer2.
|
||||||
@return < 0 Buffer1 is less than Buffer2.
|
@retval <0 Buffer1 is less than Buffer2.
|
||||||
@return > 0 Buffer1 is greater than Buffer2.
|
@retval >0 Buffer1 is greater than Buffer2.
|
||||||
**/
|
**/
|
||||||
INTN
|
INTN
|
||||||
EFIAPI
|
EFIAPI
|
@ -1,7 +1,7 @@
|
|||||||
## @file
|
## @file
|
||||||
# Library used for sorting routines.
|
# Library used for sorting routines.
|
||||||
#
|
#
|
||||||
# Copyright (c) 2009 - 2013, Intel Corporation. All rights reserved. <BR>
|
# Copyright (c) 2009 - 2014, Intel Corporation. All rights reserved. <BR>
|
||||||
#
|
#
|
||||||
# This program and the accompanying materials
|
# This program and the accompanying materials
|
||||||
# are licensed and made available under the terms and conditions of the BSD License
|
# are licensed and made available under the terms and conditions of the BSD License
|
||||||
@ -30,7 +30,7 @@
|
|||||||
|
|
||||||
[Packages]
|
[Packages]
|
||||||
MdePkg/MdePkg.dec
|
MdePkg/MdePkg.dec
|
||||||
ShellPkg/ShellPkg.dec
|
MdeModulePkg/MdeModulePkg.dec
|
||||||
|
|
||||||
[LibraryClasses]
|
[LibraryClasses]
|
||||||
MemoryAllocationLib
|
MemoryAllocationLib
|
@ -102,6 +102,9 @@
|
|||||||
#
|
#
|
||||||
CustomizedDisplayLib|Include/Library/CustomizedDisplayLib.h
|
CustomizedDisplayLib|Include/Library/CustomizedDisplayLib.h
|
||||||
|
|
||||||
|
## @libraryclass Provides sorting functions
|
||||||
|
SortLib|Include/Library/SortLib.h
|
||||||
|
|
||||||
[Guids]
|
[Guids]
|
||||||
## MdeModule package token space guid
|
## MdeModule package token space guid
|
||||||
# Include/Guid/MdeModulePkgTokenSpace.h
|
# Include/Guid/MdeModulePkgTokenSpace.h
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
/** @file
|
/** @file
|
||||||
Provides string functions, linked list functions, math functions, synchronization
|
Provides string functions, linked list functions, math functions, synchronization
|
||||||
functions, and CPU architecture-specific functions.
|
functions, file path functions, and CPU architecture-specific functions.
|
||||||
|
|
||||||
Copyright (c) 2006 - 2014, Intel Corporation. All rights reserved.<BR>
|
Copyright (c) 2006 - 2015, Intel Corporation. All rights reserved.<BR>
|
||||||
Portions copyright (c) 2008 - 2009, Apple Inc. All rights reserved.<BR>
|
Portions copyright (c) 2008 - 2009, Apple Inc. All rights reserved.<BR>
|
||||||
This program and the accompanying materials
|
This program and the accompanying materials
|
||||||
are licensed and made available under the terms and conditions of the BSD License
|
are licensed and made available under the terms and conditions of the BSD License
|
||||||
@ -484,7 +484,7 @@ AsciiStrnCatS (
|
|||||||
#ifndef DISABLE_NEW_DEPRECATED_INTERFACES
|
#ifndef DISABLE_NEW_DEPRECATED_INTERFACES
|
||||||
|
|
||||||
/**
|
/**
|
||||||
[ATTENTION] This function will be deprecated for security reason.
|
[ATTENTION] This function is deprecated for security reason.
|
||||||
|
|
||||||
Copies one Null-terminated Unicode string to another Null-terminated Unicode
|
Copies one Null-terminated Unicode string to another Null-terminated Unicode
|
||||||
string and returns the new Unicode string.
|
string and returns the new Unicode string.
|
||||||
@ -517,7 +517,7 @@ StrCpy (
|
|||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
[ATTENTION] This function will be deprecated for security reason.
|
[ATTENTION] This function is deprecated for security reason.
|
||||||
|
|
||||||
Copies up to a specified length from one Null-terminated Unicode string to
|
Copies up to a specified length from one Null-terminated Unicode string to
|
||||||
another Null-terminated Unicode string and returns the new Unicode string.
|
another Null-terminated Unicode string and returns the new Unicode string.
|
||||||
@ -686,7 +686,7 @@ StrnCmp (
|
|||||||
#ifndef DISABLE_NEW_DEPRECATED_INTERFACES
|
#ifndef DISABLE_NEW_DEPRECATED_INTERFACES
|
||||||
|
|
||||||
/**
|
/**
|
||||||
[ATTENTION] This function will be deprecated for security reason.
|
[ATTENTION] This function is deprecated for security reason.
|
||||||
|
|
||||||
Concatenates one Null-terminated Unicode string to another Null-terminated
|
Concatenates one Null-terminated Unicode string to another Null-terminated
|
||||||
Unicode string, and returns the concatenated Unicode string.
|
Unicode string, and returns the concatenated Unicode string.
|
||||||
@ -728,7 +728,7 @@ StrCat (
|
|||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
[ATTENTION] This function will be deprecated for security reason.
|
[ATTENTION] This function is deprecated for security reason.
|
||||||
|
|
||||||
Concatenates up to a specified length one Null-terminated Unicode to the end
|
Concatenates up to a specified length one Null-terminated Unicode to the end
|
||||||
of another Null-terminated Unicode string, and returns the concatenated
|
of another Null-terminated Unicode string, and returns the concatenated
|
||||||
@ -1016,7 +1016,7 @@ UnicodeStrToAsciiStr (
|
|||||||
#ifndef DISABLE_NEW_DEPRECATED_INTERFACES
|
#ifndef DISABLE_NEW_DEPRECATED_INTERFACES
|
||||||
|
|
||||||
/**
|
/**
|
||||||
[ATTENTION] This function will be deprecated for security reason.
|
[ATTENTION] This function is deprecated for security reason.
|
||||||
|
|
||||||
Copies one Null-terminated ASCII string to another Null-terminated ASCII
|
Copies one Null-terminated ASCII string to another Null-terminated ASCII
|
||||||
string and returns the new ASCII string.
|
string and returns the new ASCII string.
|
||||||
@ -1047,7 +1047,7 @@ AsciiStrCpy (
|
|||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
[ATTENTION] This function will be deprecated for security reason.
|
[ATTENTION] This function is deprecated for security reason.
|
||||||
|
|
||||||
Copies up to a specified length one Null-terminated ASCII string to another
|
Copies up to a specified length one Null-terminated ASCII string to another
|
||||||
Null-terminated ASCII string and returns the new ASCII string.
|
Null-terminated ASCII string and returns the new ASCII string.
|
||||||
@ -1245,7 +1245,7 @@ AsciiStrnCmp (
|
|||||||
#ifndef DISABLE_NEW_DEPRECATED_INTERFACES
|
#ifndef DISABLE_NEW_DEPRECATED_INTERFACES
|
||||||
|
|
||||||
/**
|
/**
|
||||||
[ATTENTION] This function will be deprecated for security reason.
|
[ATTENTION] This function is deprecated for security reason.
|
||||||
|
|
||||||
Concatenates one Null-terminated ASCII string to another Null-terminated
|
Concatenates one Null-terminated ASCII string to another Null-terminated
|
||||||
ASCII string, and returns the concatenated ASCII string.
|
ASCII string, and returns the concatenated ASCII string.
|
||||||
@ -1282,7 +1282,7 @@ AsciiStrCat (
|
|||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
[ATTENTION] This function will be deprecated for security reason.
|
[ATTENTION] This function is deprecated for security reason.
|
||||||
|
|
||||||
Concatenates up to a specified length one Null-terminated ASCII string to
|
Concatenates up to a specified length one Null-terminated ASCII string to
|
||||||
the end of another Null-terminated ASCII string, and returns the
|
the end of another Null-terminated ASCII string, and returns the
|
||||||
@ -1591,6 +1591,43 @@ BcdToDecimal8 (
|
|||||||
IN UINT8 Value
|
IN UINT8 Value
|
||||||
);
|
);
|
||||||
|
|
||||||
|
//
|
||||||
|
// File Path Manipulation Functions
|
||||||
|
//
|
||||||
|
|
||||||
|
/**
|
||||||
|
Removes the last directory or file entry in a path by changing the last
|
||||||
|
L'\' to a CHAR_NULL.
|
||||||
|
|
||||||
|
@param[in, out] Path The pointer to the path to modify.
|
||||||
|
|
||||||
|
@retval FALSE Nothing was found to remove.
|
||||||
|
@retval TRUE A directory or file was removed.
|
||||||
|
**/
|
||||||
|
BOOLEAN
|
||||||
|
EFIAPI
|
||||||
|
PathRemoveLastItem(
|
||||||
|
IN OUT CHAR16 *Path
|
||||||
|
);
|
||||||
|
|
||||||
|
/**
|
||||||
|
Function to clean up paths.
|
||||||
|
- Single periods in the path are removed.
|
||||||
|
- Double periods in the path are removed along with a single parent directory.
|
||||||
|
- Forward slashes L'/' are converted to backward slashes L'\'.
|
||||||
|
|
||||||
|
This will be done inline and the existing buffer may be larger than required
|
||||||
|
upon completion.
|
||||||
|
|
||||||
|
@param[in] Path The pointer to the string containing the path.
|
||||||
|
|
||||||
|
@return Returns Path, otherwise returns NULL to indicate that an error has occured.
|
||||||
|
**/
|
||||||
|
CHAR16*
|
||||||
|
EFIAPI
|
||||||
|
PathCleanUpDirectories(
|
||||||
|
IN CHAR16 *Path
|
||||||
|
);
|
||||||
|
|
||||||
//
|
//
|
||||||
// Linked List Functions and Macros
|
// Linked List Functions and Macros
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
/** @file
|
/** @file
|
||||||
Provides interface to EFI_FILE_HANDLE functionality.
|
Provides interface to EFI_FILE_HANDLE functionality.
|
||||||
|
|
||||||
Copyright (c) 2009 - 2011, Intel Corporation. All rights reserved.<BR>
|
Copyright (c) 2009 - 2014, Intel Corporation. All rights reserved.<BR>
|
||||||
This program and the accompanying materials
|
This program and the accompanying materials
|
||||||
are licensed and made available under the terms and conditions of the BSD License
|
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
|
which accompanies this distribution. The full text of the license may be found at
|
@ -63,6 +63,7 @@
|
|||||||
LinkedList.c
|
LinkedList.c
|
||||||
SafeString.c
|
SafeString.c
|
||||||
String.c
|
String.c
|
||||||
|
FilePaths.c
|
||||||
BaseLibInternals.h
|
BaseLibInternals.h
|
||||||
|
|
||||||
[Sources.Ia32]
|
[Sources.Ia32]
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/** @file
|
/** @file
|
||||||
Provides interface to path manipulation functions.
|
Defines file-path manipulation functions.
|
||||||
|
|
||||||
Copyright (c) 2011 - 2014, Intel Corporation. All rights reserved.<BR>
|
Copyright (c) 2011 - 2014, Intel Corporation. All rights reserved.<BR>
|
||||||
This program and the accompanying materials
|
This program and the accompanying materials
|
||||||
@ -10,18 +10,16 @@
|
|||||||
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
||||||
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||||
**/
|
**/
|
||||||
|
#include <Uefi/UefiBaseType.h>
|
||||||
#include <Base.h>
|
#include <Library/BaseMemoryLib.h>
|
||||||
#include <Library/BaseMemoryLib.h>
|
#include <Library/BaseLib.h>
|
||||||
#include <Library/PathLib.h>
|
#include <Protocol/SimpleTextIn.h>
|
||||||
#include <Library/BaseLib.h>
|
|
||||||
#include <Protocol/SimpleTextIn.h>
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
Removes the last directory or file entry in a path by changing the last
|
Removes the last directory or file entry in a path by changing the last
|
||||||
L'\' to a CHAR_NULL.
|
L'\' to a CHAR_NULL.
|
||||||
|
|
||||||
@param[in, out] Path The pointer to the path to modify.
|
@param[in,out] Path A pointer to the path to modify.
|
||||||
|
|
||||||
@retval FALSE Nothing was found to remove.
|
@retval FALSE Nothing was found to remove.
|
||||||
@retval TRUE A directory or file was removed.
|
@retval TRUE A directory or file was removed.
|
||||||
@ -53,19 +51,18 @@ PathRemoveLastItem(
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
Function to clean up paths.
|
Function to clean up paths.
|
||||||
|
|
||||||
- Single periods in the path are removed.
|
- Single periods in the path are removed.
|
||||||
- Double periods in the path are removed along with a single parent directory.
|
- Double periods in the path are removed along with a single parent directory.
|
||||||
- Forward slashes L'/' are converted to backward slashes L'\'.
|
- Forward slashes L'/' are converted to backward slashes L'\'.
|
||||||
|
|
||||||
This will be done inline and the existing buffer may be larger than required
|
This will be done inline and the existing buffer may be larger than required
|
||||||
upon completion.
|
upon completion.
|
||||||
|
|
||||||
@param[in] Path The pointer to the string containing the path.
|
@param[in] Path The pointer to the string containing the path.
|
||||||
|
|
||||||
@retval NULL An error occured.
|
@return Returns Path, otherwise returns NULL to indicate that an error has occured.
|
||||||
@return Path in all other instances.
|
|
||||||
**/
|
**/
|
||||||
CHAR16*
|
CHAR16*
|
||||||
EFIAPI
|
EFIAPI
|
||||||
@ -75,10 +72,10 @@ PathCleanUpDirectories(
|
|||||||
{
|
{
|
||||||
CHAR16 *TempString;
|
CHAR16 *TempString;
|
||||||
UINTN TempSize;
|
UINTN TempSize;
|
||||||
|
|
||||||
if (Path==NULL) {
|
if (Path==NULL) {
|
||||||
return(NULL);
|
return(NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
// Fix up the '/' vs '\'
|
// Fix up the '/' vs '\'
|
||||||
//
|
//
|
||||||
@ -87,7 +84,6 @@ PathCleanUpDirectories(
|
|||||||
*TempString = L'\\';
|
*TempString = L'\\';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
// Fix up the ..
|
// Fix up the ..
|
||||||
//
|
//
|
||||||
@ -102,7 +98,6 @@ PathCleanUpDirectories(
|
|||||||
*TempString = CHAR_NULL;
|
*TempString = CHAR_NULL;
|
||||||
PathRemoveLastItem(Path);
|
PathRemoveLastItem(Path);
|
||||||
}
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
// Fix up the .
|
// Fix up the .
|
||||||
//
|
//
|
@ -1084,7 +1084,7 @@ FileHandlePrintLine(
|
|||||||
//
|
//
|
||||||
// Get a buffer to print into
|
// Get a buffer to print into
|
||||||
//
|
//
|
||||||
Buffer = AllocateZeroPool (PcdGet16 (PcdShellPrintBufferSize));
|
Buffer = AllocateZeroPool (PcdGet16 (PcdUefiFileHandleLibPrintBufferSize));
|
||||||
if (Buffer == NULL) {
|
if (Buffer == NULL) {
|
||||||
return (EFI_OUT_OF_RESOURCES);
|
return (EFI_OUT_OF_RESOURCES);
|
||||||
}
|
}
|
||||||
@ -1093,7 +1093,7 @@ FileHandlePrintLine(
|
|||||||
// Print into our buffer
|
// Print into our buffer
|
||||||
//
|
//
|
||||||
VA_START (Marker, Format);
|
VA_START (Marker, Format);
|
||||||
UnicodeVSPrint (Buffer, PcdGet16 (PcdShellPrintBufferSize), Format, Marker);
|
UnicodeVSPrint (Buffer, PcdGet16 (PcdUefiFileHandleLibPrintBufferSize), Format, Marker);
|
||||||
VA_END (Marker);
|
VA_END (Marker);
|
||||||
|
|
||||||
//
|
//
|
@ -1,16 +1,14 @@
|
|||||||
## @file
|
## @file
|
||||||
# Provides interface to shell functionality for shell commands and applications.
|
# Provides interface to shell functionality for shell commands and applications.
|
||||||
#
|
#
|
||||||
# Copyright (c) 2006 - 2010, Intel Corporation. All rights reserved. <BR>
|
# Copyright (c) 2006 - 2014, 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
|
||||||
|
# http://opensource.org/licenses/bsd-license.php
|
||||||
#
|
#
|
||||||
# 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
|
|
||||||
# http://opensource.org/licenses/bsd-license.php
|
|
||||||
# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
||||||
# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||||
#
|
|
||||||
#
|
|
||||||
##
|
##
|
||||||
|
|
||||||
[Defines]
|
[Defines]
|
||||||
@ -30,7 +28,6 @@
|
|||||||
|
|
||||||
[Packages]
|
[Packages]
|
||||||
MdePkg/MdePkg.dec
|
MdePkg/MdePkg.dec
|
||||||
ShellPkg/ShellPkg.dec
|
|
||||||
|
|
||||||
[LibraryClasses]
|
[LibraryClasses]
|
||||||
MemoryAllocationLib
|
MemoryAllocationLib
|
||||||
@ -47,4 +44,4 @@
|
|||||||
gEfiFileInfoGuid # ALWAYS_CONSUMED
|
gEfiFileInfoGuid # ALWAYS_CONSUMED
|
||||||
|
|
||||||
[Pcd.common]
|
[Pcd.common]
|
||||||
gEfiShellPkgTokenSpaceGuid.PcdShellPrintBufferSize # ALWAYS_CONSUMED
|
gEfiMdePkgTokenSpaceGuid.PcdUefiFileHandleLibPrintBufferSize # ALWAYS_CONSUMED
|
@ -226,6 +226,9 @@
|
|||||||
## @libraryclass Defines library APIs used by modules to get/set print error level.
|
## @libraryclass Defines library APIs used by modules to get/set print error level.
|
||||||
DebugPrintErrorLevelLib|Include/Library/DebugPrintErrorLevelLib.h
|
DebugPrintErrorLevelLib|Include/Library/DebugPrintErrorLevelLib.h
|
||||||
|
|
||||||
|
## @libraryclass provides EFI_FILE_HANDLE services
|
||||||
|
FileHandleLib|Include/Library/FileHandleLib.h
|
||||||
|
|
||||||
[LibraryClasses.IA32, LibraryClasses.X64]
|
[LibraryClasses.IA32, LibraryClasses.X64]
|
||||||
## @libraryclass Abstracts both S/W SMI generation and detection.
|
## @libraryclass Abstracts both S/W SMI generation and detection.
|
||||||
##
|
##
|
||||||
@ -1706,6 +1709,11 @@
|
|||||||
# @Prompt Maximum Printable Number of Characters.
|
# @Prompt Maximum Printable Number of Characters.
|
||||||
gEfiMdePkgTokenSpaceGuid.PcdUefiLibMaxPrintBufferSize|320|UINT32|0x101
|
gEfiMdePkgTokenSpaceGuid.PcdUefiLibMaxPrintBufferSize|320|UINT32|0x101
|
||||||
|
|
||||||
|
## This is the print buffer length for FileHandleLib.
|
||||||
|
# FileHandlePrintLine() sizes buffers based on this PCD value for printing.
|
||||||
|
# @Prompt Number of Printable Characters.
|
||||||
|
gEfiMdePkgTokenSpaceGuid.PcdUefiFileHandleLibPrintBufferSize|1536|UINT16|0x201
|
||||||
|
|
||||||
## Indicates the allowable maximum number in extract handler table.
|
## Indicates the allowable maximum number in extract handler table.
|
||||||
# @Prompt Maximum Number of GuidedExtractHandler.
|
# @Prompt Maximum Number of GuidedExtractHandler.
|
||||||
gEfiMdePkgTokenSpaceGuid.PcdMaximumGuidedExtractHandler|0x10|UINT32|0x00000025
|
gEfiMdePkgTokenSpaceGuid.PcdMaximumGuidedExtractHandler|0x10|UINT32|0x00000025
|
||||||
@ -1785,4 +1793,4 @@
|
|||||||
gEfiMdePkgTokenSpaceGuid.PcdDefaultTerminalType|0|UINT8|0x00000024
|
gEfiMdePkgTokenSpaceGuid.PcdDefaultTerminalType|0|UINT8|0x00000024
|
||||||
|
|
||||||
[UserExtensions.TianoCore."ExtraFiles"]
|
[UserExtensions.TianoCore."ExtraFiles"]
|
||||||
MdePkgExtra.uni
|
MdePkgExtra.uni
|
||||||
|
@ -48,14 +48,14 @@
|
|||||||
OpensslLib|CryptoPkg/Library/OpensslLib/OpensslLib.inf
|
OpensslLib|CryptoPkg/Library/OpensslLib/OpensslLib.inf
|
||||||
IntrinsicLib|CryptoPkg/Library/IntrinsicLib/IntrinsicLib.inf
|
IntrinsicLib|CryptoPkg/Library/IntrinsicLib/IntrinsicLib.inf
|
||||||
DebugPrintErrorLevelLib|MdePkg/Library/BaseDebugPrintErrorLevelLib/BaseDebugPrintErrorLevelLib.inf
|
DebugPrintErrorLevelLib|MdePkg/Library/BaseDebugPrintErrorLevelLib/BaseDebugPrintErrorLevelLib.inf
|
||||||
|
FileHandleLib|MdePkg/Library/UefiFileHandleLib/UefiFileHandleLib.inf
|
||||||
|
SortLib|MdeModulePkg/Library/UefiSortLib/UefiSortLib.inf
|
||||||
|
|
||||||
[LibraryClasses.common.UEFI_DRIVER]
|
[LibraryClasses.common.UEFI_DRIVER]
|
||||||
DebugLib|MdePkg/Library/UefiDebugLibConOut/UefiDebugLibConOut.inf
|
DebugLib|MdePkg/Library/UefiDebugLibConOut/UefiDebugLibConOut.inf
|
||||||
|
|
||||||
[LibraryClasses.common.UEFI_APPLICATION]
|
[LibraryClasses.common.UEFI_APPLICATION]
|
||||||
DebugLib|MdePkg/Library/UefiDebugLibStdErr/UefiDebugLibStdErr.inf
|
DebugLib|MdePkg/Library/UefiDebugLibStdErr/UefiDebugLibStdErr.inf
|
||||||
FileHandleLib|ShellPkg/Library/UefiFileHandleLib/UefiFileHandleLib.inf
|
|
||||||
SortLib|ShellPkg/Library/UefiSortLib/UefiSortLib.inf
|
|
||||||
ShellLib|ShellPkg/Library/UefiShellLib/UefiShellLib.inf
|
ShellLib|ShellPkg/Library/UefiShellLib/UefiShellLib.inf
|
||||||
|
|
||||||
[LibraryClasses.ARM, LibraryClasses.AARCH64]
|
[LibraryClasses.ARM, LibraryClasses.AARCH64]
|
||||||
|
@ -88,7 +88,7 @@
|
|||||||
UefiApplicationEntryPoint|MdePkg/Library/UefiApplicationEntryPoint/UefiApplicationEntryPoint.inf
|
UefiApplicationEntryPoint|MdePkg/Library/UefiApplicationEntryPoint/UefiApplicationEntryPoint.inf
|
||||||
DevicePathLib|MdePkg/Library/UefiDevicePathLibDevicePathProtocol/UefiDevicePathLibDevicePathProtocol.inf
|
DevicePathLib|MdePkg/Library/UefiDevicePathLibDevicePathProtocol/UefiDevicePathLibDevicePathProtocol.inf
|
||||||
NvVarsFileLib|OvmfPkg/Library/NvVarsFileLib/NvVarsFileLib.inf
|
NvVarsFileLib|OvmfPkg/Library/NvVarsFileLib/NvVarsFileLib.inf
|
||||||
FileHandleLib|ShellPkg/Library/UefiFileHandleLib/UefiFileHandleLib.inf
|
FileHandleLib|MdePkg/Library/UefiFileHandleLib/UefiFileHandleLib.inf
|
||||||
UefiCpuLib|UefiCpuPkg/Library/BaseUefiCpuLib/BaseUefiCpuLib.inf
|
UefiCpuLib|UefiCpuPkg/Library/BaseUefiCpuLib/BaseUefiCpuLib.inf
|
||||||
SecurityManagementLib|MdeModulePkg/Library/DxeSecurityManagementLib/DxeSecurityManagementLib.inf
|
SecurityManagementLib|MdeModulePkg/Library/DxeSecurityManagementLib/DxeSecurityManagementLib.inf
|
||||||
NetLib|MdeModulePkg/Library/DxeNetLib/DxeNetLib.inf
|
NetLib|MdeModulePkg/Library/DxeNetLib/DxeNetLib.inf
|
||||||
@ -571,11 +571,10 @@
|
|||||||
NULL|ShellPkg/Library/UefiShellInstall1CommandsLib/UefiShellInstall1CommandsLib.inf
|
NULL|ShellPkg/Library/UefiShellInstall1CommandsLib/UefiShellInstall1CommandsLib.inf
|
||||||
NULL|ShellPkg/Library/UefiShellNetwork1CommandsLib/UefiShellNetwork1CommandsLib.inf
|
NULL|ShellPkg/Library/UefiShellNetwork1CommandsLib/UefiShellNetwork1CommandsLib.inf
|
||||||
HandleParsingLib|ShellPkg/Library/UefiHandleParsingLib/UefiHandleParsingLib.inf
|
HandleParsingLib|ShellPkg/Library/UefiHandleParsingLib/UefiHandleParsingLib.inf
|
||||||
FileHandleLib|ShellPkg/Library/UefiFileHandleLib/UefiFileHandleLib.inf
|
|
||||||
ShellLib|ShellPkg/Library/UefiShellLib/UefiShellLib.inf
|
ShellLib|ShellPkg/Library/UefiShellLib/UefiShellLib.inf
|
||||||
SortLib|ShellPkg/Library/UefiSortLib/UefiSortLib.inf
|
FileHandleLib|MdePkg/Library/UefiFileHandleLib/UefiFileHandleLib.inf
|
||||||
|
SortLib|MdeModulePkg/Library/UefiSortLib/UefiSortLib.inf
|
||||||
PrintLib|MdePkg/Library/BasePrintLib/BasePrintLib.inf
|
PrintLib|MdePkg/Library/BasePrintLib/BasePrintLib.inf
|
||||||
PathLib|ShellPkg/Library/BasePathLib/BasePathLib.inf
|
|
||||||
# SafeBlockIoLib|ShellPkg/Library/SafeBlockIoLib/SafeBlockIoLib.inf
|
# SafeBlockIoLib|ShellPkg/Library/SafeBlockIoLib/SafeBlockIoLib.inf
|
||||||
# SafeOpenProtocolLib|ShellPkg/Library/SafeOpenProtocolLib/SafeOpenProtocolLib.inf
|
# SafeOpenProtocolLib|ShellPkg/Library/SafeOpenProtocolLib/SafeOpenProtocolLib.inf
|
||||||
BcfgCommandLib|ShellPkg/Library/UefiShellBcfgCommandLib/UefiShellBcfgCommandLib.inf
|
BcfgCommandLib|ShellPkg/Library/UefiShellBcfgCommandLib/UefiShellBcfgCommandLib.inf
|
||||||
|
@ -93,7 +93,7 @@
|
|||||||
UefiApplicationEntryPoint|MdePkg/Library/UefiApplicationEntryPoint/UefiApplicationEntryPoint.inf
|
UefiApplicationEntryPoint|MdePkg/Library/UefiApplicationEntryPoint/UefiApplicationEntryPoint.inf
|
||||||
DevicePathLib|MdePkg/Library/UefiDevicePathLibDevicePathProtocol/UefiDevicePathLibDevicePathProtocol.inf
|
DevicePathLib|MdePkg/Library/UefiDevicePathLibDevicePathProtocol/UefiDevicePathLibDevicePathProtocol.inf
|
||||||
NvVarsFileLib|OvmfPkg/Library/NvVarsFileLib/NvVarsFileLib.inf
|
NvVarsFileLib|OvmfPkg/Library/NvVarsFileLib/NvVarsFileLib.inf
|
||||||
FileHandleLib|ShellPkg/Library/UefiFileHandleLib/UefiFileHandleLib.inf
|
FileHandleLib|MdePkg/Library/UefiFileHandleLib/UefiFileHandleLib.inf
|
||||||
UefiCpuLib|UefiCpuPkg/Library/BaseUefiCpuLib/BaseUefiCpuLib.inf
|
UefiCpuLib|UefiCpuPkg/Library/BaseUefiCpuLib/BaseUefiCpuLib.inf
|
||||||
SecurityManagementLib|MdeModulePkg/Library/DxeSecurityManagementLib/DxeSecurityManagementLib.inf
|
SecurityManagementLib|MdeModulePkg/Library/DxeSecurityManagementLib/DxeSecurityManagementLib.inf
|
||||||
NetLib|MdeModulePkg/Library/DxeNetLib/DxeNetLib.inf
|
NetLib|MdeModulePkg/Library/DxeNetLib/DxeNetLib.inf
|
||||||
@ -578,11 +578,10 @@
|
|||||||
NULL|ShellPkg/Library/UefiShellInstall1CommandsLib/UefiShellInstall1CommandsLib.inf
|
NULL|ShellPkg/Library/UefiShellInstall1CommandsLib/UefiShellInstall1CommandsLib.inf
|
||||||
NULL|ShellPkg/Library/UefiShellNetwork1CommandsLib/UefiShellNetwork1CommandsLib.inf
|
NULL|ShellPkg/Library/UefiShellNetwork1CommandsLib/UefiShellNetwork1CommandsLib.inf
|
||||||
HandleParsingLib|ShellPkg/Library/UefiHandleParsingLib/UefiHandleParsingLib.inf
|
HandleParsingLib|ShellPkg/Library/UefiHandleParsingLib/UefiHandleParsingLib.inf
|
||||||
FileHandleLib|ShellPkg/Library/UefiFileHandleLib/UefiFileHandleLib.inf
|
|
||||||
ShellLib|ShellPkg/Library/UefiShellLib/UefiShellLib.inf
|
ShellLib|ShellPkg/Library/UefiShellLib/UefiShellLib.inf
|
||||||
SortLib|ShellPkg/Library/UefiSortLib/UefiSortLib.inf
|
FileHandleLib|MdePkg/Library/UefiFileHandleLib/UefiFileHandleLib.inf
|
||||||
|
SortLib|MdeModulePkg/Library/UefiSortLib/UefiSortLib.inf
|
||||||
PrintLib|MdePkg/Library/BasePrintLib/BasePrintLib.inf
|
PrintLib|MdePkg/Library/BasePrintLib/BasePrintLib.inf
|
||||||
PathLib|ShellPkg/Library/BasePathLib/BasePathLib.inf
|
|
||||||
# SafeBlockIoLib|ShellPkg/Library/SafeBlockIoLib/SafeBlockIoLib.inf
|
# SafeBlockIoLib|ShellPkg/Library/SafeBlockIoLib/SafeBlockIoLib.inf
|
||||||
# SafeOpenProtocolLib|ShellPkg/Library/SafeOpenProtocolLib/SafeOpenProtocolLib.inf
|
# SafeOpenProtocolLib|ShellPkg/Library/SafeOpenProtocolLib/SafeOpenProtocolLib.inf
|
||||||
BcfgCommandLib|ShellPkg/Library/UefiShellBcfgCommandLib/UefiShellBcfgCommandLib.inf
|
BcfgCommandLib|ShellPkg/Library/UefiShellBcfgCommandLib/UefiShellBcfgCommandLib.inf
|
||||||
|
@ -93,7 +93,7 @@
|
|||||||
UefiApplicationEntryPoint|MdePkg/Library/UefiApplicationEntryPoint/UefiApplicationEntryPoint.inf
|
UefiApplicationEntryPoint|MdePkg/Library/UefiApplicationEntryPoint/UefiApplicationEntryPoint.inf
|
||||||
DevicePathLib|MdePkg/Library/UefiDevicePathLibDevicePathProtocol/UefiDevicePathLibDevicePathProtocol.inf
|
DevicePathLib|MdePkg/Library/UefiDevicePathLibDevicePathProtocol/UefiDevicePathLibDevicePathProtocol.inf
|
||||||
NvVarsFileLib|OvmfPkg/Library/NvVarsFileLib/NvVarsFileLib.inf
|
NvVarsFileLib|OvmfPkg/Library/NvVarsFileLib/NvVarsFileLib.inf
|
||||||
FileHandleLib|ShellPkg/Library/UefiFileHandleLib/UefiFileHandleLib.inf
|
FileHandleLib|MdePkg/Library/UefiFileHandleLib/UefiFileHandleLib.inf
|
||||||
UefiCpuLib|UefiCpuPkg/Library/BaseUefiCpuLib/BaseUefiCpuLib.inf
|
UefiCpuLib|UefiCpuPkg/Library/BaseUefiCpuLib/BaseUefiCpuLib.inf
|
||||||
SecurityManagementLib|MdeModulePkg/Library/DxeSecurityManagementLib/DxeSecurityManagementLib.inf
|
SecurityManagementLib|MdeModulePkg/Library/DxeSecurityManagementLib/DxeSecurityManagementLib.inf
|
||||||
NetLib|MdeModulePkg/Library/DxeNetLib/DxeNetLib.inf
|
NetLib|MdeModulePkg/Library/DxeNetLib/DxeNetLib.inf
|
||||||
@ -576,11 +576,10 @@
|
|||||||
NULL|ShellPkg/Library/UefiShellInstall1CommandsLib/UefiShellInstall1CommandsLib.inf
|
NULL|ShellPkg/Library/UefiShellInstall1CommandsLib/UefiShellInstall1CommandsLib.inf
|
||||||
NULL|ShellPkg/Library/UefiShellNetwork1CommandsLib/UefiShellNetwork1CommandsLib.inf
|
NULL|ShellPkg/Library/UefiShellNetwork1CommandsLib/UefiShellNetwork1CommandsLib.inf
|
||||||
HandleParsingLib|ShellPkg/Library/UefiHandleParsingLib/UefiHandleParsingLib.inf
|
HandleParsingLib|ShellPkg/Library/UefiHandleParsingLib/UefiHandleParsingLib.inf
|
||||||
FileHandleLib|ShellPkg/Library/UefiFileHandleLib/UefiFileHandleLib.inf
|
|
||||||
ShellLib|ShellPkg/Library/UefiShellLib/UefiShellLib.inf
|
ShellLib|ShellPkg/Library/UefiShellLib/UefiShellLib.inf
|
||||||
SortLib|ShellPkg/Library/UefiSortLib/UefiSortLib.inf
|
FileHandleLib|MdePkg/Library/UefiFileHandleLib/UefiFileHandleLib.inf
|
||||||
|
SortLib|MdeModulePkg/Library/UefiSortLib/UefiSortLib.inf
|
||||||
PrintLib|MdePkg/Library/BasePrintLib/BasePrintLib.inf
|
PrintLib|MdePkg/Library/BasePrintLib/BasePrintLib.inf
|
||||||
PathLib|ShellPkg/Library/BasePathLib/BasePathLib.inf
|
|
||||||
# SafeBlockIoLib|ShellPkg/Library/SafeBlockIoLib/SafeBlockIoLib.inf
|
# SafeBlockIoLib|ShellPkg/Library/SafeBlockIoLib/SafeBlockIoLib.inf
|
||||||
# SafeOpenProtocolLib|ShellPkg/Library/SafeOpenProtocolLib/SafeOpenProtocolLib.inf
|
# SafeOpenProtocolLib|ShellPkg/Library/SafeOpenProtocolLib/SafeOpenProtocolLib.inf
|
||||||
BcfgCommandLib|ShellPkg/Library/UefiShellBcfgCommandLib/UefiShellBcfgCommandLib.inf
|
BcfgCommandLib|ShellPkg/Library/UefiShellBcfgCommandLib/UefiShellBcfgCommandLib.inf
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
## @file
|
## @file
|
||||||
# Build description file to generate Shell DP application.
|
# Build description file to generate Shell DP application.
|
||||||
#
|
#
|
||||||
# Copyright (c) 2009 - 2013, Intel Corporation. All rights reserved.<BR>
|
# Copyright (c) 2009 - 2014, Intel Corporation. All rights reserved.<BR>
|
||||||
# This program and the accompanying materials
|
# This program and the accompanying materials
|
||||||
# are licensed and made available under the terms and conditions of the BSD License
|
# 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
|
# which accompanies this distribution. The full text of the license may be found at
|
||||||
@ -47,10 +47,10 @@
|
|||||||
UefiHiiServicesLib|MdeModulePkg/Library/UefiHiiServicesLib/UefiHiiServicesLib.inf
|
UefiHiiServicesLib|MdeModulePkg/Library/UefiHiiServicesLib/UefiHiiServicesLib.inf
|
||||||
PerformanceLib|MdeModulePkg/Library/DxePerformanceLib/DxePerformanceLib.inf
|
PerformanceLib|MdeModulePkg/Library/DxePerformanceLib/DxePerformanceLib.inf
|
||||||
IoLib|MdePkg/Library/BaseIoLibIntrinsic/BaseIoLibIntrinsic.inf
|
IoLib|MdePkg/Library/BaseIoLibIntrinsic/BaseIoLibIntrinsic.inf
|
||||||
|
FileHandleLib|MdePkg/Library/UefiFileHandleLib/UefiFileHandleLib.inf
|
||||||
|
SortLib|MdeModulePkg/Library/UefiSortLib/UefiSortLib.inf
|
||||||
|
|
||||||
SortLib|ShellPkg/Library/UefiSortLib/UefiSortLib.inf
|
|
||||||
ShellLib|ShellPkg/Library/UefiShellLib/UefiShellLib.inf
|
ShellLib|ShellPkg/Library/UefiShellLib/UefiShellLib.inf
|
||||||
FileHandleLib|ShellPkg/Library/UefiFileHandleLib/UefiFileHandleLib.inf
|
|
||||||
|
|
||||||
PciLib|MdePkg/Library/BasePciLibCf8/BasePciLibCf8.inf
|
PciLib|MdePkg/Library/BasePciLibCf8/BasePciLibCf8.inf
|
||||||
PciCf8Lib|MdePkg/Library/BasePciCf8Lib/BasePciCf8Lib.inf
|
PciCf8Lib|MdePkg/Library/BasePciCf8Lib/BasePciCf8Lib.inf
|
||||||
|
@ -46,7 +46,6 @@
|
|||||||
#include <Library/HiiLib.h>
|
#include <Library/HiiLib.h>
|
||||||
#include <Library/PrintLib.h>
|
#include <Library/PrintLib.h>
|
||||||
#include <Library/HandleParsingLib.h>
|
#include <Library/HandleParsingLib.h>
|
||||||
#include <Library/PathLib.h>
|
|
||||||
#include <Library/FileHandleLib.h>
|
#include <Library/FileHandleLib.h>
|
||||||
|
|
||||||
#include "ShellParametersProtocol.h"
|
#include "ShellParametersProtocol.h"
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
# This is the shell application
|
# This is the shell application
|
||||||
#
|
#
|
||||||
# Copyright (c) 2013, Hewlett-Packard Development Company, L.P.
|
# Copyright (c) 2013, Hewlett-Packard Development Company, L.P.
|
||||||
# Copyright (c) 2009 - 2013, Intel Corporation. All rights reserved.<BR>
|
# Copyright (c) 2009 - 2014, Intel Corporation. All rights reserved.<BR>
|
||||||
#
|
#
|
||||||
# This program and the accompanying materials
|
# This program and the accompanying materials
|
||||||
# are licensed and made available under the terms and conditions of the BSD License
|
# are licensed and made available under the terms and conditions of the BSD License
|
||||||
@ -70,7 +70,6 @@
|
|||||||
HiiLib
|
HiiLib
|
||||||
SortLib
|
SortLib
|
||||||
HandleParsingLib
|
HandleParsingLib
|
||||||
PathLib
|
|
||||||
|
|
||||||
[Guids]
|
[Guids]
|
||||||
gShellVariableGuid # ALWAYS_CONSUMES
|
gShellVariableGuid # ALWAYS_CONSUMES
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
## @file
|
## @file
|
||||||
# This is the shell sorting testing application
|
# This is the shell sorting testing application
|
||||||
#
|
#
|
||||||
# Copyright (c) 2009 - 2010, Intel Corporation. All rights reserved.<BR>
|
# Copyright (c) 2009 - 2014, Intel Corporation. All rights reserved.<BR>
|
||||||
#
|
#
|
||||||
# This program and the accompanying materials
|
# This program and the accompanying materials
|
||||||
# are licensed and made available under the terms and conditions of the BSD License
|
# are licensed and made available under the terms and conditions of the BSD License
|
||||||
@ -33,6 +33,7 @@
|
|||||||
[Packages]
|
[Packages]
|
||||||
MdePkg/MdePkg.dec
|
MdePkg/MdePkg.dec
|
||||||
ShellPkg/ShellPkg.dec
|
ShellPkg/ShellPkg.dec
|
||||||
|
MdeModulePkg/MdeModulePkg.dec
|
||||||
|
|
||||||
[LibraryClasses]
|
[LibraryClasses]
|
||||||
ShellCEntryLib
|
ShellCEntryLib
|
||||||
|
@ -1,56 +0,0 @@
|
|||||||
/** @file
|
|
||||||
Provides interface to path manipulation functions.
|
|
||||||
|
|
||||||
Copyright (c) 2011, 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
|
|
||||||
http://opensource.org/licenses/bsd-license.php.
|
|
||||||
|
|
||||||
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
|
||||||
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
|
||||||
**/
|
|
||||||
|
|
||||||
#ifndef _PATH_LIB_
|
|
||||||
#define _PATH_LIB_
|
|
||||||
|
|
||||||
#include <Base.h>
|
|
||||||
#include <Library/BaseMemoryLib.h>
|
|
||||||
|
|
||||||
/**
|
|
||||||
Removes the last directory or file entry in a path by changing the last
|
|
||||||
L'\' to a CHAR_NULL.
|
|
||||||
|
|
||||||
@param[in, out] Path The pointer to the path to modify.
|
|
||||||
|
|
||||||
@retval FALSE Nothing was found to remove.
|
|
||||||
@retval TRUE A directory or file was removed.
|
|
||||||
**/
|
|
||||||
BOOLEAN
|
|
||||||
EFIAPI
|
|
||||||
PathRemoveLastItem(
|
|
||||||
IN OUT CHAR16 *Path
|
|
||||||
);
|
|
||||||
|
|
||||||
/**
|
|
||||||
Function to clean up paths.
|
|
||||||
|
|
||||||
- Single periods in the path are removed.
|
|
||||||
- Double periods in the path are removed along with a single parent directory.
|
|
||||||
- Forward slashes L'/' are converted to backward slashes L'\'.
|
|
||||||
|
|
||||||
This will be done inline and the existing buffer may be larger than required
|
|
||||||
upon completion.
|
|
||||||
|
|
||||||
@param[in] Path The pointer to the string containing the path.
|
|
||||||
|
|
||||||
@retval NULL An error occured.
|
|
||||||
@return Path in all other instances.
|
|
||||||
**/
|
|
||||||
CHAR16*
|
|
||||||
EFIAPI
|
|
||||||
PathCleanUpDirectories(
|
|
||||||
IN CHAR16 *Path
|
|
||||||
);
|
|
||||||
|
|
||||||
#endif //_PATH_LIB_
|
|
@ -1,38 +0,0 @@
|
|||||||
## @file
|
|
||||||
# Provides interface to path manipulation functions.
|
|
||||||
#
|
|
||||||
# Copyright (c) 2011, 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
|
|
||||||
# http://opensource.org/licenses/bsd-license.php
|
|
||||||
# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
|
||||||
# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
|
||||||
#
|
|
||||||
#
|
|
||||||
##
|
|
||||||
|
|
||||||
[Defines]
|
|
||||||
INF_VERSION = 0x00010006
|
|
||||||
BASE_NAME = BasePathLib
|
|
||||||
FILE_GUID = ED244F93-B97A-4a17-83E0-A03CF2A7F7B4
|
|
||||||
MODULE_TYPE = UEFI_DRIVER
|
|
||||||
VERSION_STRING = 1.0
|
|
||||||
LIBRARY_CLASS = PathLib|UEFI_APPLICATION UEFI_DRIVER
|
|
||||||
|
|
||||||
#
|
|
||||||
# VALID_ARCHITECTURES = IA32 X64 IPF EBC
|
|
||||||
#
|
|
||||||
|
|
||||||
[Sources.common]
|
|
||||||
BasePathLib.c
|
|
||||||
|
|
||||||
[Packages]
|
|
||||||
MdePkg/MdePkg.dec
|
|
||||||
ShellPkg/ShellPkg.dec
|
|
||||||
|
|
||||||
|
|
||||||
[LibraryClasses]
|
|
||||||
BaseMemoryLib
|
|
||||||
BaseLib
|
|
@ -2,7 +2,7 @@
|
|||||||
Main file for If and else shell level 1 function.
|
Main file for If and else shell level 1 function.
|
||||||
|
|
||||||
Copyright (c) 2013, Hewlett-Packard Development Company, L.P.
|
Copyright (c) 2013, Hewlett-Packard Development Company, L.P.
|
||||||
Copyright (c) 2009 - 2011, Intel Corporation. All rights reserved.<BR>
|
Copyright (c) 2009 - 2014, Intel Corporation. All rights reserved.<BR>
|
||||||
This program and the accompanying materials
|
This program and the accompanying materials
|
||||||
are licensed and made available under the terms and conditions of the BSD License
|
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
|
which accompanies this distribution. The full text of the license may be found at
|
||||||
@ -15,7 +15,6 @@
|
|||||||
|
|
||||||
#include "UefiShellLevel1CommandsLib.h"
|
#include "UefiShellLevel1CommandsLib.h"
|
||||||
#include <Library/PrintLib.h>
|
#include <Library/PrintLib.h>
|
||||||
#include <Library/PathLib.h>
|
|
||||||
|
|
||||||
typedef enum {
|
typedef enum {
|
||||||
EndTagOr,
|
EndTagOr,
|
||||||
|
@ -50,7 +50,6 @@
|
|||||||
UefiBootServicesTableLib
|
UefiBootServicesTableLib
|
||||||
SortLib
|
SortLib
|
||||||
PrintLib
|
PrintLib
|
||||||
PathLib
|
|
||||||
|
|
||||||
[Pcd.common]
|
[Pcd.common]
|
||||||
gEfiShellPkgTokenSpaceGuid.PcdShellSupportLevel # ALWAYS_CONSUMED
|
gEfiShellPkgTokenSpaceGuid.PcdShellSupportLevel # ALWAYS_CONSUMED
|
||||||
|
@ -47,7 +47,6 @@
|
|||||||
#include <Library/HiiLib.h>
|
#include <Library/HiiLib.h>
|
||||||
#include <Library/SortLib.h>
|
#include <Library/SortLib.h>
|
||||||
#include <Library/FileHandleLib.h>
|
#include <Library/FileHandleLib.h>
|
||||||
#include <Library/PathLib.h>
|
|
||||||
|
|
||||||
extern CONST CHAR16 mFileName[];
|
extern CONST CHAR16 mFileName[];
|
||||||
extern EFI_HANDLE gShellLevel2HiiHandle;
|
extern EFI_HANDLE gShellLevel2HiiHandle;
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
## @file
|
## @file
|
||||||
# Provides shell level 2 functions
|
# Provides shell level 2 functions
|
||||||
#
|
#
|
||||||
# Copyright (c) 2009 - 2013, Intel Corporation. All rights reserved. <BR>
|
# Copyright (c) 2009 - 2014, Intel Corporation. All rights reserved. <BR>
|
||||||
#
|
#
|
||||||
# This program and the accompanying materials
|
# This program and the accompanying materials
|
||||||
# are licensed and made available under the terms and conditions of the BSD License
|
# are licensed and made available under the terms and conditions of the BSD License
|
||||||
@ -64,7 +64,6 @@
|
|||||||
PcdLib
|
PcdLib
|
||||||
HiiLib
|
HiiLib
|
||||||
HandleParsingLib
|
HandleParsingLib
|
||||||
PathLib
|
|
||||||
DevicePathLib
|
DevicePathLib
|
||||||
|
|
||||||
[Protocols]
|
[Protocols]
|
||||||
@ -82,4 +81,4 @@
|
|||||||
[Guids]
|
[Guids]
|
||||||
gEfiFileSystemInfoGuid
|
gEfiFileSystemInfoGuid
|
||||||
gEfiFileInfoGuid
|
gEfiFileInfoGuid
|
||||||
gShellLevel2HiiGuid
|
gShellLevel2HiiGuid
|
||||||
|
@ -18,8 +18,8 @@
|
|||||||
[Defines]
|
[Defines]
|
||||||
DEC_SPECIFICATION = 0x00010005
|
DEC_SPECIFICATION = 0x00010005
|
||||||
PACKAGE_NAME = ShellPkg
|
PACKAGE_NAME = ShellPkg
|
||||||
PACKAGE_GUID = 9FB7587C-93F7-40a7-9C04-FD7BA94EE646
|
PACKAGE_GUID = C1014BB7-4092-43D4-984F-0738EB424DBF
|
||||||
PACKAGE_VERSION = 0.50
|
PACKAGE_VERSION = 1.0
|
||||||
|
|
||||||
[Includes]
|
[Includes]
|
||||||
Include
|
Include
|
||||||
@ -31,21 +31,12 @@
|
|||||||
## @libraryclass Provides shell internal support Only available for shell internal commands
|
## @libraryclass Provides shell internal support Only available for shell internal commands
|
||||||
ShellCommandLib|Include/Library/ShellCommandLib.h
|
ShellCommandLib|Include/Library/ShellCommandLib.h
|
||||||
|
|
||||||
## @libraryclass provides EFI_FILE_HANDLE services used by Shell and ShellLib
|
|
||||||
FileHandleLib|Include/Library/FileHandleLib.h
|
|
||||||
|
|
||||||
## @libraryclass Allows for a shell application to have a C style entry point
|
## @libraryclass Allows for a shell application to have a C style entry point
|
||||||
ShellCEntryLib|Include/Library/ShellCEntryLib.h
|
ShellCEntryLib|Include/Library/ShellCEntryLib.h
|
||||||
|
|
||||||
## @libraryclass Provides sorting functions
|
|
||||||
SortLib|Include/Library/SortLib.h
|
|
||||||
|
|
||||||
## @libraryclass Provides advanced parsing functions
|
## @libraryclass Provides advanced parsing functions
|
||||||
HandleParsingLib|Include/Library/HandleParsingLib.h
|
HandleParsingLib|Include/Library/HandleParsingLib.h
|
||||||
|
|
||||||
## @libraryclass Provides path manipulation functions
|
|
||||||
PathLib|Include/Library/PathLib.h
|
|
||||||
|
|
||||||
## @libraryclass provides BCFG command
|
## @libraryclass provides BCFG command
|
||||||
BcfgCommandLib|Include/Library/BcfgCommandLib.h
|
BcfgCommandLib|Include/Library/BcfgCommandLib.h
|
||||||
|
|
||||||
@ -91,7 +82,7 @@
|
|||||||
# This should be FALSE for compiling the shell application itself only.
|
# This should be FALSE for compiling the shell application itself only.
|
||||||
gEfiShellPkgTokenSpaceGuid.PcdShellLibAutoInitialize|TRUE|BOOLEAN|0x00000005
|
gEfiShellPkgTokenSpaceGuid.PcdShellLibAutoInitialize|TRUE|BOOLEAN|0x00000005
|
||||||
|
|
||||||
## This is the max buffer for ShellLib, FileHandleLib, and internal Shell printings.
|
## This is the max buffer for ShellLib and internal Shell printings.
|
||||||
gEfiShellPkgTokenSpaceGuid.PcdShellPrintBufferSize|16000|UINT16|0x0000000C
|
gEfiShellPkgTokenSpaceGuid.PcdShellPrintBufferSize|16000|UINT16|0x0000000C
|
||||||
|
|
||||||
## This flag is used to control the commands available in the shell
|
## This flag is used to control the commands available in the shell
|
||||||
|
@ -16,7 +16,7 @@
|
|||||||
[Defines]
|
[Defines]
|
||||||
PLATFORM_NAME = Shell
|
PLATFORM_NAME = Shell
|
||||||
PLATFORM_GUID = E1DC9BF8-7013-4c99-9437-795DAA45F3BD
|
PLATFORM_GUID = E1DC9BF8-7013-4c99-9437-795DAA45F3BD
|
||||||
PLATFORM_VERSION = 0.50
|
PLATFORM_VERSION = 1.0
|
||||||
DSC_SPECIFICATION = 0x00010006
|
DSC_SPECIFICATION = 0x00010006
|
||||||
OUTPUT_DIRECTORY = Build/Shell
|
OUTPUT_DIRECTORY = Build/Shell
|
||||||
SUPPORTED_ARCHITECTURES = IA32|IPF|X64|EBC|ARM|AARCH64
|
SUPPORTED_ARCHITECTURES = IA32|IPF|X64|EBC|ARM|AARCH64
|
||||||
@ -35,6 +35,8 @@
|
|||||||
BaseLib|MdePkg/Library/BaseLib/BaseLib.inf
|
BaseLib|MdePkg/Library/BaseLib/BaseLib.inf
|
||||||
BaseMemoryLib|MdePkg/Library/BaseMemoryLib/BaseMemoryLib.inf
|
BaseMemoryLib|MdePkg/Library/BaseMemoryLib/BaseMemoryLib.inf
|
||||||
PrintLib|MdePkg/Library/BasePrintLib/BasePrintLib.inf
|
PrintLib|MdePkg/Library/BasePrintLib/BasePrintLib.inf
|
||||||
|
FileHandleLib|MdePkg/Library/UefiFileHandleLib/UefiFileHandleLib.inf
|
||||||
|
SortLib|MdeModulePkg/Library/UefiSortLib/UefiSortLib.inf
|
||||||
UefiRuntimeServicesTableLib|MdePkg/Library/UefiRuntimeServicesTableLib/UefiRuntimeServicesTableLib.inf
|
UefiRuntimeServicesTableLib|MdePkg/Library/UefiRuntimeServicesTableLib/UefiRuntimeServicesTableLib.inf
|
||||||
UefiHiiServicesLib|MdeModulePkg/Library/UefiHiiServicesLib/UefiHiiServicesLib.inf
|
UefiHiiServicesLib|MdeModulePkg/Library/UefiHiiServicesLib/UefiHiiServicesLib.inf
|
||||||
HiiLib|MdeModulePkg/Library/UefiHiiLib/UefiHiiLib.inf
|
HiiLib|MdeModulePkg/Library/UefiHiiLib/UefiHiiLib.inf
|
||||||
@ -42,13 +44,10 @@
|
|||||||
|
|
||||||
ShellLib|ShellPkg/Library/UefiShellLib/UefiShellLib.inf
|
ShellLib|ShellPkg/Library/UefiShellLib/UefiShellLib.inf
|
||||||
ShellCommandLib|ShellPkg/Library/UefiShellCommandLib/UefiShellCommandLib.inf
|
ShellCommandLib|ShellPkg/Library/UefiShellCommandLib/UefiShellCommandLib.inf
|
||||||
FileHandleLib|ShellPkg/Library/UefiFileHandleLib/UefiFileHandleLib.inf
|
|
||||||
ShellCEntryLib|ShellPkg/Library/UefiShellCEntryLib/UefiShellCEntryLib.inf
|
ShellCEntryLib|ShellPkg/Library/UefiShellCEntryLib/UefiShellCEntryLib.inf
|
||||||
SortLib|ShellPkg/Library/UefiSortLib/UefiSortLib.inf
|
|
||||||
HandleParsingLib|ShellPkg/Library/UefiHandleParsingLib/UefiHandleParsingLib.inf
|
HandleParsingLib|ShellPkg/Library/UefiHandleParsingLib/UefiHandleParsingLib.inf
|
||||||
|
|
||||||
PeCoffGetEntryPointLib|MdePkg/Library/BasePeCoffGetEntryPointLib/BasePeCoffGetEntryPointLib.inf
|
PeCoffGetEntryPointLib|MdePkg/Library/BasePeCoffGetEntryPointLib/BasePeCoffGetEntryPointLib.inf
|
||||||
PathLib|ShellPkg/Library/BasePathLib/BasePathLib.inf
|
|
||||||
BcfgCommandLib|ShellPkg/Library/UefiShellBcfgCommandLib/UefiShellBcfgCommandLib.inf
|
BcfgCommandLib|ShellPkg/Library/UefiShellBcfgCommandLib/UefiShellBcfgCommandLib.inf
|
||||||
|
|
||||||
[LibraryClasses.ARM]
|
[LibraryClasses.ARM]
|
||||||
@ -74,7 +73,6 @@
|
|||||||
!endif #$(NO_SHELL_PROFILES)
|
!endif #$(NO_SHELL_PROFILES)
|
||||||
|
|
||||||
[Components]
|
[Components]
|
||||||
ShellPkg/Library/UefiFileHandleLib/UefiFileHandleLib.inf
|
|
||||||
ShellPkg/Library/UefiShellLib/UefiShellLib.inf
|
ShellPkg/Library/UefiShellLib/UefiShellLib.inf
|
||||||
ShellPkg/Library/UefiShellCommandLib/UefiShellCommandLib.inf
|
ShellPkg/Library/UefiShellCommandLib/UefiShellCommandLib.inf
|
||||||
ShellPkg/Library/UefiShellLevel2CommandsLib/UefiShellLevel2CommandsLib.inf
|
ShellPkg/Library/UefiShellLevel2CommandsLib/UefiShellLevel2CommandsLib.inf
|
||||||
|
Reference in New Issue
Block a user