diff options
29 files changed, 128 insertions, 196 deletions
diff --git a/ShellPkg/Include/Library/SortLib.h b/MdeModulePkg/Include/Library/SortLib.h index a3e0fd9bec..a891cabee9 100644 --- a/ShellPkg/Include/Library/SortLib.h +++ b/MdeModulePkg/Include/Library/SortLib.h @@ -1,7 +1,7 @@ /** @file
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
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
@@ -11,7 +11,6 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
**/
-
#ifndef __SORT_LIB_H__
#define __SORT_LIB_H__
diff --git a/ShellPkg/Library/BaseSortLib/BaseSortLib.c b/MdeModulePkg/Library/BaseSortLib/BaseSortLib.c index 0b7e8f3f6f..ab8a60585e 100644 --- a/ShellPkg/Library/BaseSortLib/BaseSortLib.c +++ b/MdeModulePkg/Library/BaseSortLib/BaseSortLib.c @@ -1,7 +1,7 @@ /** @file
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
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
@@ -11,7 +11,6 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
**/
-
#include <Uefi.h>
#include <Library/BaseLib.h>
diff --git a/ShellPkg/Library/BaseSortLib/BaseSortLib.inf b/MdeModulePkg/Library/BaseSortLib/BaseSortLib.inf index 3d2b259819..e372248fef 100644 --- a/ShellPkg/Library/BaseSortLib/BaseSortLib.inf +++ b/MdeModulePkg/Library/BaseSortLib/BaseSortLib.inf @@ -1,7 +1,7 @@ ## @file
# 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
# are licensed and made available under the terms and conditions of the BSD License
@@ -30,7 +30,7 @@ [Packages]
MdePkg/MdePkg.dec
- ShellPkg/ShellPkg.dec
+ MdeModulePkg/MdeModulePkg.dec
[LibraryClasses]
MemoryAllocationLib
diff --git a/ShellPkg/Library/UefiSortLib/UefiSortLib.c b/MdeModulePkg/Library/UefiSortLib/UefiSortLib.c index 2aab9d2691..8a45cd0d9f 100644 --- a/ShellPkg/Library/UefiSortLib/UefiSortLib.c +++ b/MdeModulePkg/Library/UefiSortLib/UefiSortLib.c @@ -1,7 +1,7 @@ /** @file
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
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
@@ -13,7 +13,6 @@ **/
#include <Uefi.h>
-#include <ShellBase.h>
#include <Protocol/UnicodeCollation.h>
#include <Protocol/DevicePath.h>
@@ -28,6 +27,13 @@ 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,
@@ -191,8 +197,8 @@ PerformQuickSort ( @param[in] Buffer2 pointer to second DevicePath pointer to compare
@retval 0 Buffer1 equal to Buffer2
- @return < 0 Buffer1 is less than Buffer2
- @return > 0 Buffer1 is greater than Buffer2
+ @retval <0 Buffer1 is less than Buffer2
+ @retval >0 Buffer1 is greater than Buffer2
**/
INTN
EFIAPI
@@ -253,8 +259,8 @@ DevicePathCompare ( TextPath2);
}
- SHELL_FREE_NON_NULL(TextPath1);
- SHELL_FREE_NON_NULL(TextPath2);
+ USL_FREE_NON_NULL(TextPath1);
+ USL_FREE_NON_NULL(TextPath2);
return (RetVal);
}
@@ -266,8 +272,8 @@ DevicePathCompare ( @param[in] Buffer2 Pointer to second String to compare.
@retval 0 Buffer1 equal to Buffer2.
- @return < 0 Buffer1 is less than Buffer2.
- @return > 0 Buffer1 is greater than Buffer2.
+ @retval <0 Buffer1 is less than Buffer2.
+ @retval >0 Buffer1 is greater than Buffer2.
**/
INTN
EFIAPI
@@ -300,8 +306,8 @@ StringNoCaseCompare ( @param[in] Buffer2 Pointer to second String to compare (CHAR16**).
@retval 0 Buffer1 equal to Buffer2.
- @return < 0 Buffer1 is less than Buffer2.
- @return > 0 Buffer1 is greater than Buffer2.
+ @retval <0 Buffer1 is less than Buffer2.
+ @retval >0 Buffer1 is greater than Buffer2.
**/
INTN
EFIAPI
diff --git a/ShellPkg/Library/UefiSortLib/UefiSortLib.inf b/MdeModulePkg/Library/UefiSortLib/UefiSortLib.inf index b227b3b4e8..4d3d9e011e 100644 --- a/ShellPkg/Library/UefiSortLib/UefiSortLib.inf +++ b/MdeModulePkg/Library/UefiSortLib/UefiSortLib.inf @@ -1,7 +1,7 @@ ## @file
# 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
# are licensed and made available under the terms and conditions of the BSD License
@@ -30,7 +30,7 @@ [Packages]
MdePkg/MdePkg.dec
- ShellPkg/ShellPkg.dec
+ MdeModulePkg/MdeModulePkg.dec
[LibraryClasses]
MemoryAllocationLib
diff --git a/MdeModulePkg/MdeModulePkg.dec b/MdeModulePkg/MdeModulePkg.dec index 83906d21da..2e7e461c0f 100644 --- a/MdeModulePkg/MdeModulePkg.dec +++ b/MdeModulePkg/MdeModulePkg.dec @@ -102,6 +102,9 @@ #
CustomizedDisplayLib|Include/Library/CustomizedDisplayLib.h
+ ## @libraryclass Provides sorting functions
+ SortLib|Include/Library/SortLib.h
+
[Guids]
## MdeModule package token space guid
# Include/Guid/MdeModulePkgTokenSpace.h
diff --git a/MdePkg/Include/Library/BaseLib.h b/MdePkg/Include/Library/BaseLib.h index bd3f9cfc60..750f82e8f7 100644 --- a/MdePkg/Include/Library/BaseLib.h +++ b/MdePkg/Include/Library/BaseLib.h @@ -1,8 +1,8 @@ /** @file
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>
This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
@@ -484,7 +484,7 @@ AsciiStrnCatS ( #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
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
another Null-terminated Unicode string and returns the new Unicode string.
@@ -686,7 +686,7 @@ StrnCmp ( #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
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
of another Null-terminated Unicode string, and returns the concatenated
@@ -1016,7 +1016,7 @@ UnicodeStrToAsciiStr ( #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
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
Null-terminated ASCII string and returns the new ASCII string.
@@ -1245,7 +1245,7 @@ AsciiStrnCmp ( #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
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
the end of another Null-terminated ASCII string, and returns the
@@ -1591,6 +1591,43 @@ BcdToDecimal8 ( 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
diff --git a/ShellPkg/Include/Library/FileHandleLib.h b/MdePkg/Include/Library/FileHandleLib.h index 6c79397570..123cc8c58f 100644 --- a/ShellPkg/Include/Library/FileHandleLib.h +++ b/MdePkg/Include/Library/FileHandleLib.h @@ -1,7 +1,7 @@ /** @file
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
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
diff --git a/MdePkg/Library/BaseLib/BaseLib.inf b/MdePkg/Library/BaseLib/BaseLib.inf index 6d03f941fd..fc0cb9638b 100644 --- a/MdePkg/Library/BaseLib/BaseLib.inf +++ b/MdePkg/Library/BaseLib/BaseLib.inf @@ -63,6 +63,7 @@ LinkedList.c
SafeString.c
String.c
+ FilePaths.c
BaseLibInternals.h
[Sources.Ia32]
diff --git a/ShellPkg/Library/BasePathLib/BasePathLib.c b/MdePkg/Library/BaseLib/FilePaths.c index 301bd3b279..b7ff480bb9 100644 --- a/ShellPkg/Library/BasePathLib/BasePathLib.c +++ b/MdePkg/Library/BaseLib/FilePaths.c @@ -1,5 +1,5 @@ /** @file
- Provides interface to path manipulation functions.
+ Defines file-path manipulation functions.
Copyright (c) 2011 - 2014, Intel Corporation. All rights reserved.<BR>
This program and the accompanying materials
@@ -10,18 +10,16 @@ THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
**/
-
-#include <Base.h>
-#include <Library/BaseMemoryLib.h>
-#include <Library/PathLib.h>
-#include <Library/BaseLib.h>
-#include <Protocol/SimpleTextIn.h>
+#include <Uefi/UefiBaseType.h>
+#include <Library/BaseMemoryLib.h>
+#include <Library/BaseLib.h>
+#include <Protocol/SimpleTextIn.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.
+ @param[in,out] Path A pointer to the path to modify.
@retval FALSE Nothing was found to remove.
@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.
- 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
+ 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.
+ @return Returns Path, otherwise returns NULL to indicate that an error has occured.
**/
CHAR16*
EFIAPI
@@ -75,10 +72,10 @@ PathCleanUpDirectories( {
CHAR16 *TempString;
UINTN TempSize;
+
if (Path==NULL) {
return(NULL);
}
-
//
// Fix up the '/' vs '\'
//
@@ -87,7 +84,6 @@ PathCleanUpDirectories( *TempString = L'\\';
}
}
-
//
// Fix up the ..
//
@@ -102,7 +98,6 @@ PathCleanUpDirectories( *TempString = CHAR_NULL;
PathRemoveLastItem(Path);
}
-
//
// Fix up the .
//
diff --git a/ShellPkg/Library/UefiFileHandleLib/UefiFileHandleLib.c b/MdePkg/Library/UefiFileHandleLib/UefiFileHandleLib.c index 5af75c5adb..be66c57bb8 100644 --- a/ShellPkg/Library/UefiFileHandleLib/UefiFileHandleLib.c +++ b/MdePkg/Library/UefiFileHandleLib/UefiFileHandleLib.c @@ -1084,7 +1084,7 @@ FileHandlePrintLine( //
// Get a buffer to print into
//
- Buffer = AllocateZeroPool (PcdGet16 (PcdShellPrintBufferSize));
+ Buffer = AllocateZeroPool (PcdGet16 (PcdUefiFileHandleLibPrintBufferSize));
if (Buffer == NULL) {
return (EFI_OUT_OF_RESOURCES);
}
@@ -1093,7 +1093,7 @@ FileHandlePrintLine( // Print into our buffer
//
VA_START (Marker, Format);
- UnicodeVSPrint (Buffer, PcdGet16 (PcdShellPrintBufferSize), Format, Marker);
+ UnicodeVSPrint (Buffer, PcdGet16 (PcdUefiFileHandleLibPrintBufferSize), Format, Marker);
VA_END (Marker);
//
diff --git a/ShellPkg/Library/UefiFileHandleLib/UefiFileHandleLib.inf b/MdePkg/Library/UefiFileHandleLib/UefiFileHandleLib.inf index 1d27c6da2c..832e949b92 100644 --- a/ShellPkg/Library/UefiFileHandleLib/UefiFileHandleLib.inf +++ b/MdePkg/Library/UefiFileHandleLib/UefiFileHandleLib.inf @@ -1,16 +1,14 @@ ## @file
# 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,
# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
-#
-#
##
[Defines]
@@ -30,7 +28,6 @@ [Packages]
MdePkg/MdePkg.dec
- ShellPkg/ShellPkg.dec
[LibraryClasses]
MemoryAllocationLib
@@ -47,4 +44,4 @@ gEfiFileInfoGuid # ALWAYS_CONSUMED
[Pcd.common]
- gEfiShellPkgTokenSpaceGuid.PcdShellPrintBufferSize # ALWAYS_CONSUMED
+ gEfiMdePkgTokenSpaceGuid.PcdUefiFileHandleLibPrintBufferSize # ALWAYS_CONSUMED
diff --git a/MdePkg/MdePkg.dec b/MdePkg/MdePkg.dec index 6dc696e5d9..1eb4346e18 100644 --- a/MdePkg/MdePkg.dec +++ b/MdePkg/MdePkg.dec @@ -226,6 +226,9 @@ ## @libraryclass Defines library APIs used by modules to get/set print error level.
DebugPrintErrorLevelLib|Include/Library/DebugPrintErrorLevelLib.h
+ ## @libraryclass provides EFI_FILE_HANDLE services
+ FileHandleLib|Include/Library/FileHandleLib.h
+
[LibraryClasses.IA32, LibraryClasses.X64]
## @libraryclass Abstracts both S/W SMI generation and detection.
##
@@ -1706,6 +1709,11 @@ # @Prompt Maximum Printable Number of Characters.
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.
# @Prompt Maximum Number of GuidedExtractHandler.
gEfiMdePkgTokenSpaceGuid.PcdMaximumGuidedExtractHandler|0x10|UINT32|0x00000025
@@ -1785,4 +1793,4 @@ gEfiMdePkgTokenSpaceGuid.PcdDefaultTerminalType|0|UINT8|0x00000024
[UserExtensions.TianoCore."ExtraFiles"]
- MdePkgExtra.uni
\ No newline at end of file + MdePkgExtra.uni
diff --git a/NetworkPkg/NetworkPkg.dsc b/NetworkPkg/NetworkPkg.dsc index 80685dd645..b97d31a7b3 100644 --- a/NetworkPkg/NetworkPkg.dsc +++ b/NetworkPkg/NetworkPkg.dsc @@ -48,14 +48,14 @@ OpensslLib|CryptoPkg/Library/OpensslLib/OpensslLib.inf
IntrinsicLib|CryptoPkg/Library/IntrinsicLib/IntrinsicLib.inf
DebugPrintErrorLevelLib|MdePkg/Library/BaseDebugPrintErrorLevelLib/BaseDebugPrintErrorLevelLib.inf
+ FileHandleLib|MdePkg/Library/UefiFileHandleLib/UefiFileHandleLib.inf
+ SortLib|MdeModulePkg/Library/UefiSortLib/UefiSortLib.inf
[LibraryClasses.common.UEFI_DRIVER]
DebugLib|MdePkg/Library/UefiDebugLibConOut/UefiDebugLibConOut.inf
[LibraryClasses.common.UEFI_APPLICATION]
DebugLib|MdePkg/Library/UefiDebugLibStdErr/UefiDebugLibStdErr.inf
- FileHandleLib|ShellPkg/Library/UefiFileHandleLib/UefiFileHandleLib.inf
- SortLib|ShellPkg/Library/UefiSortLib/UefiSortLib.inf
ShellLib|ShellPkg/Library/UefiShellLib/UefiShellLib.inf
[LibraryClasses.ARM, LibraryClasses.AARCH64]
diff --git a/OvmfPkg/OvmfPkgIa32.dsc b/OvmfPkg/OvmfPkgIa32.dsc index d7bf609b32..ca65669875 100644 --- a/OvmfPkg/OvmfPkgIa32.dsc +++ b/OvmfPkg/OvmfPkgIa32.dsc @@ -88,7 +88,7 @@ UefiApplicationEntryPoint|MdePkg/Library/UefiApplicationEntryPoint/UefiApplicationEntryPoint.inf
DevicePathLib|MdePkg/Library/UefiDevicePathLibDevicePathProtocol/UefiDevicePathLibDevicePathProtocol.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
SecurityManagementLib|MdeModulePkg/Library/DxeSecurityManagementLib/DxeSecurityManagementLib.inf
NetLib|MdeModulePkg/Library/DxeNetLib/DxeNetLib.inf
@@ -571,11 +571,10 @@ NULL|ShellPkg/Library/UefiShellInstall1CommandsLib/UefiShellInstall1CommandsLib.inf
NULL|ShellPkg/Library/UefiShellNetwork1CommandsLib/UefiShellNetwork1CommandsLib.inf
HandleParsingLib|ShellPkg/Library/UefiHandleParsingLib/UefiHandleParsingLib.inf
- FileHandleLib|ShellPkg/Library/UefiFileHandleLib/UefiFileHandleLib.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
- PathLib|ShellPkg/Library/BasePathLib/BasePathLib.inf
# SafeBlockIoLib|ShellPkg/Library/SafeBlockIoLib/SafeBlockIoLib.inf
# SafeOpenProtocolLib|ShellPkg/Library/SafeOpenProtocolLib/SafeOpenProtocolLib.inf
BcfgCommandLib|ShellPkg/Library/UefiShellBcfgCommandLib/UefiShellBcfgCommandLib.inf
diff --git a/OvmfPkg/OvmfPkgIa32X64.dsc b/OvmfPkg/OvmfPkgIa32X64.dsc index 4c921740e8..4b4a1da717 100644 --- a/OvmfPkg/OvmfPkgIa32X64.dsc +++ b/OvmfPkg/OvmfPkgIa32X64.dsc @@ -93,7 +93,7 @@ UefiApplicationEntryPoint|MdePkg/Library/UefiApplicationEntryPoint/UefiApplicationEntryPoint.inf
DevicePathLib|MdePkg/Library/UefiDevicePathLibDevicePathProtocol/UefiDevicePathLibDevicePathProtocol.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
SecurityManagementLib|MdeModulePkg/Library/DxeSecurityManagementLib/DxeSecurityManagementLib.inf
NetLib|MdeModulePkg/Library/DxeNetLib/DxeNetLib.inf
@@ -578,11 +578,10 @@ NULL|ShellPkg/Library/UefiShellInstall1CommandsLib/UefiShellInstall1CommandsLib.inf
NULL|ShellPkg/Library/UefiShellNetwork1CommandsLib/UefiShellNetwork1CommandsLib.inf
HandleParsingLib|ShellPkg/Library/UefiHandleParsingLib/UefiHandleParsingLib.inf
- FileHandleLib|ShellPkg/Library/UefiFileHandleLib/UefiFileHandleLib.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
- PathLib|ShellPkg/Library/BasePathLib/BasePathLib.inf
# SafeBlockIoLib|ShellPkg/Library/SafeBlockIoLib/SafeBlockIoLib.inf
# SafeOpenProtocolLib|ShellPkg/Library/SafeOpenProtocolLib/SafeOpenProtocolLib.inf
BcfgCommandLib|ShellPkg/Library/UefiShellBcfgCommandLib/UefiShellBcfgCommandLib.inf
diff --git a/OvmfPkg/OvmfPkgX64.dsc b/OvmfPkg/OvmfPkgX64.dsc index 457774efcb..eb3f34b835 100644 --- a/OvmfPkg/OvmfPkgX64.dsc +++ b/OvmfPkg/OvmfPkgX64.dsc @@ -93,7 +93,7 @@ UefiApplicationEntryPoint|MdePkg/Library/UefiApplicationEntryPoint/UefiApplicationEntryPoint.inf
DevicePathLib|MdePkg/Library/UefiDevicePathLibDevicePathProtocol/UefiDevicePathLibDevicePathProtocol.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
SecurityManagementLib|MdeModulePkg/Library/DxeSecurityManagementLib/DxeSecurityManagementLib.inf
NetLib|MdeModulePkg/Library/DxeNetLib/DxeNetLib.inf
@@ -576,11 +576,10 @@ NULL|ShellPkg/Library/UefiShellInstall1CommandsLib/UefiShellInstall1CommandsLib.inf
NULL|ShellPkg/Library/UefiShellNetwork1CommandsLib/UefiShellNetwork1CommandsLib.inf
HandleParsingLib|ShellPkg/Library/UefiHandleParsingLib/UefiHandleParsingLib.inf
- FileHandleLib|ShellPkg/Library/UefiFileHandleLib/UefiFileHandleLib.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
- PathLib|ShellPkg/Library/BasePathLib/BasePathLib.inf
# SafeBlockIoLib|ShellPkg/Library/SafeBlockIoLib/SafeBlockIoLib.inf
# SafeOpenProtocolLib|ShellPkg/Library/SafeOpenProtocolLib/SafeOpenProtocolLib.inf
BcfgCommandLib|ShellPkg/Library/UefiShellBcfgCommandLib/UefiShellBcfgCommandLib.inf
diff --git a/PerformancePkg/PerformancePkg.dsc b/PerformancePkg/PerformancePkg.dsc index 8c0890e85e..d03ea3623f 100644 --- a/PerformancePkg/PerformancePkg.dsc +++ b/PerformancePkg/PerformancePkg.dsc @@ -1,7 +1,7 @@ ## @file
# 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
# 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
@@ -47,10 +47,10 @@ UefiHiiServicesLib|MdeModulePkg/Library/UefiHiiServicesLib/UefiHiiServicesLib.inf
PerformanceLib|MdeModulePkg/Library/DxePerformanceLib/DxePerformanceLib.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
- FileHandleLib|ShellPkg/Library/UefiFileHandleLib/UefiFileHandleLib.inf
PciLib|MdePkg/Library/BasePciLibCf8/BasePciLibCf8.inf
PciCf8Lib|MdePkg/Library/BasePciCf8Lib/BasePciCf8Lib.inf
diff --git a/ShellPkg/Application/Shell/Shell.h b/ShellPkg/Application/Shell/Shell.h index c20ee3a803..95d9669f7c 100644 --- a/ShellPkg/Application/Shell/Shell.h +++ b/ShellPkg/Application/Shell/Shell.h @@ -46,7 +46,6 @@ #include <Library/HiiLib.h>
#include <Library/PrintLib.h>
#include <Library/HandleParsingLib.h>
-#include <Library/PathLib.h>
#include <Library/FileHandleLib.h>
#include "ShellParametersProtocol.h"
diff --git a/ShellPkg/Application/Shell/Shell.inf b/ShellPkg/Application/Shell/Shell.inf index c3e09a6cf1..e20ac08a7e 100644 --- a/ShellPkg/Application/Shell/Shell.inf +++ b/ShellPkg/Application/Shell/Shell.inf @@ -2,7 +2,7 @@ # This is the shell application
#
# 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
# are licensed and made available under the terms and conditions of the BSD License
@@ -70,7 +70,6 @@ HiiLib
SortLib
HandleParsingLib
- PathLib
[Guids]
gShellVariableGuid # ALWAYS_CONSUMES
diff --git a/ShellPkg/Application/ShellSortTestApp/ShellSortTestApp.inf b/ShellPkg/Application/ShellSortTestApp/ShellSortTestApp.inf index ab13244215..70130c1c06 100644 --- a/ShellPkg/Application/ShellSortTestApp/ShellSortTestApp.inf +++ b/ShellPkg/Application/ShellSortTestApp/ShellSortTestApp.inf @@ -1,7 +1,7 @@ ## @file
# 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
# are licensed and made available under the terms and conditions of the BSD License
@@ -33,6 +33,7 @@ [Packages]
MdePkg/MdePkg.dec
ShellPkg/ShellPkg.dec
+ MdeModulePkg/MdeModulePkg.dec
[LibraryClasses]
ShellCEntryLib
diff --git a/ShellPkg/Include/Library/PathLib.h b/ShellPkg/Include/Library/PathLib.h deleted file mode 100644 index ee473523d2..0000000000 --- a/ShellPkg/Include/Library/PathLib.h +++ /dev/null @@ -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_
diff --git a/ShellPkg/Library/BasePathLib/BasePathLib.inf b/ShellPkg/Library/BasePathLib/BasePathLib.inf deleted file mode 100644 index a9bd6a8e45..0000000000 --- a/ShellPkg/Library/BasePathLib/BasePathLib.inf +++ /dev/null @@ -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
\ No newline at end of file diff --git a/ShellPkg/Library/UefiShellLevel1CommandsLib/If.c b/ShellPkg/Library/UefiShellLevel1CommandsLib/If.c index 791b1aed8f..5d9ccdd944 100644 --- a/ShellPkg/Library/UefiShellLevel1CommandsLib/If.c +++ b/ShellPkg/Library/UefiShellLevel1CommandsLib/If.c @@ -2,7 +2,7 @@ Main file for If and else shell level 1 function.
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
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
@@ -15,7 +15,6 @@ #include "UefiShellLevel1CommandsLib.h"
#include <Library/PrintLib.h>
-#include <Library/PathLib.h>
typedef enum {
EndTagOr,
diff --git a/ShellPkg/Library/UefiShellLevel1CommandsLib/UefiShellLevel1CommandsLib.inf b/ShellPkg/Library/UefiShellLevel1CommandsLib/UefiShellLevel1CommandsLib.inf index 02b1627b4f..617fc50197 100644 --- a/ShellPkg/Library/UefiShellLevel1CommandsLib/UefiShellLevel1CommandsLib.inf +++ b/ShellPkg/Library/UefiShellLevel1CommandsLib/UefiShellLevel1CommandsLib.inf @@ -50,7 +50,6 @@ UefiBootServicesTableLib
SortLib
PrintLib
- PathLib
[Pcd.common]
gEfiShellPkgTokenSpaceGuid.PcdShellSupportLevel # ALWAYS_CONSUMED
diff --git a/ShellPkg/Library/UefiShellLevel2CommandsLib/UefiShellLevel2CommandsLib.h b/ShellPkg/Library/UefiShellLevel2CommandsLib/UefiShellLevel2CommandsLib.h index f1549b9162..05582da3ca 100644 --- a/ShellPkg/Library/UefiShellLevel2CommandsLib/UefiShellLevel2CommandsLib.h +++ b/ShellPkg/Library/UefiShellLevel2CommandsLib/UefiShellLevel2CommandsLib.h @@ -47,7 +47,6 @@ #include <Library/HiiLib.h>
#include <Library/SortLib.h>
#include <Library/FileHandleLib.h>
-#include <Library/PathLib.h>
extern CONST CHAR16 mFileName[];
extern EFI_HANDLE gShellLevel2HiiHandle;
diff --git a/ShellPkg/Library/UefiShellLevel2CommandsLib/UefiShellLevel2CommandsLib.inf b/ShellPkg/Library/UefiShellLevel2CommandsLib/UefiShellLevel2CommandsLib.inf index 52844429ea..7060c7738f 100644 --- a/ShellPkg/Library/UefiShellLevel2CommandsLib/UefiShellLevel2CommandsLib.inf +++ b/ShellPkg/Library/UefiShellLevel2CommandsLib/UefiShellLevel2CommandsLib.inf @@ -1,7 +1,7 @@ ## @file
# 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
# are licensed and made available under the terms and conditions of the BSD License
@@ -64,7 +64,6 @@ PcdLib
HiiLib
HandleParsingLib
- PathLib
DevicePathLib
[Protocols]
@@ -82,4 +81,4 @@ [Guids]
gEfiFileSystemInfoGuid
gEfiFileInfoGuid
- gShellLevel2HiiGuid
\ No newline at end of file + gShellLevel2HiiGuid
diff --git a/ShellPkg/ShellPkg.dec b/ShellPkg/ShellPkg.dec index a99f9a688d..0fece09123 100644 --- a/ShellPkg/ShellPkg.dec +++ b/ShellPkg/ShellPkg.dec @@ -18,8 +18,8 @@ [Defines]
DEC_SPECIFICATION = 0x00010005
PACKAGE_NAME = ShellPkg
- PACKAGE_GUID = 9FB7587C-93F7-40a7-9C04-FD7BA94EE646
- PACKAGE_VERSION = 0.50
+ PACKAGE_GUID = C1014BB7-4092-43D4-984F-0738EB424DBF
+ PACKAGE_VERSION = 1.0
[Includes]
Include
@@ -31,21 +31,12 @@ ## @libraryclass Provides shell internal support Only available for shell internal commands
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
ShellCEntryLib|Include/Library/ShellCEntryLib.h
- ## @libraryclass Provides sorting functions
- SortLib|Include/Library/SortLib.h
-
## @libraryclass Provides advanced parsing functions
HandleParsingLib|Include/Library/HandleParsingLib.h
- ## @libraryclass Provides path manipulation functions
- PathLib|Include/Library/PathLib.h
-
## @libraryclass provides BCFG command
BcfgCommandLib|Include/Library/BcfgCommandLib.h
@@ -91,7 +82,7 @@ # This should be FALSE for compiling the shell application itself only.
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
## This flag is used to control the commands available in the shell
diff --git a/ShellPkg/ShellPkg.dsc b/ShellPkg/ShellPkg.dsc index 75a50ddd69..9d54acc81f 100644 --- a/ShellPkg/ShellPkg.dsc +++ b/ShellPkg/ShellPkg.dsc @@ -16,7 +16,7 @@ [Defines]
PLATFORM_NAME = Shell
PLATFORM_GUID = E1DC9BF8-7013-4c99-9437-795DAA45F3BD
- PLATFORM_VERSION = 0.50
+ PLATFORM_VERSION = 1.0
DSC_SPECIFICATION = 0x00010006
OUTPUT_DIRECTORY = Build/Shell
SUPPORTED_ARCHITECTURES = IA32|IPF|X64|EBC|ARM|AARCH64
@@ -35,6 +35,8 @@ BaseLib|MdePkg/Library/BaseLib/BaseLib.inf
BaseMemoryLib|MdePkg/Library/BaseMemoryLib/BaseMemoryLib.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
UefiHiiServicesLib|MdeModulePkg/Library/UefiHiiServicesLib/UefiHiiServicesLib.inf
HiiLib|MdeModulePkg/Library/UefiHiiLib/UefiHiiLib.inf
@@ -42,13 +44,10 @@ ShellLib|ShellPkg/Library/UefiShellLib/UefiShellLib.inf
ShellCommandLib|ShellPkg/Library/UefiShellCommandLib/UefiShellCommandLib.inf
- FileHandleLib|ShellPkg/Library/UefiFileHandleLib/UefiFileHandleLib.inf
ShellCEntryLib|ShellPkg/Library/UefiShellCEntryLib/UefiShellCEntryLib.inf
- SortLib|ShellPkg/Library/UefiSortLib/UefiSortLib.inf
HandleParsingLib|ShellPkg/Library/UefiHandleParsingLib/UefiHandleParsingLib.inf
PeCoffGetEntryPointLib|MdePkg/Library/BasePeCoffGetEntryPointLib/BasePeCoffGetEntryPointLib.inf
- PathLib|ShellPkg/Library/BasePathLib/BasePathLib.inf
BcfgCommandLib|ShellPkg/Library/UefiShellBcfgCommandLib/UefiShellBcfgCommandLib.inf
[LibraryClasses.ARM]
@@ -74,7 +73,6 @@ !endif #$(NO_SHELL_PROFILES)
[Components]
- ShellPkg/Library/UefiFileHandleLib/UefiFileHandleLib.inf
ShellPkg/Library/UefiShellLib/UefiShellLib.inf
ShellPkg/Library/UefiShellCommandLib/UefiShellCommandLib.inf
ShellPkg/Library/UefiShellLevel2CommandsLib/UefiShellLevel2CommandsLib.inf
|