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:
Daryl McDaniel 2015-01-13 01:04:07 +00:00 committed by darylm503
parent 5d6bf9e229
commit ae591c14b3
29 changed files with 128 additions and 196 deletions

View File

@ -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__

View File

@ -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>

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -63,6 +63,7 @@
LinkedList.c
SafeString.c
String.c
FilePaths.c
BaseLibInternals.h
[Sources.Ia32]

View File

@ -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 .
//

View File

@ -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);
//

View File

@ -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

View File

@ -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
MdePkgExtra.uni

View File

@ -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]

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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"

View File

@ -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

View File

@ -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

View File

@ -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_

View File

@ -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

View File

@ -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,

View File

@ -50,7 +50,6 @@
UefiBootServicesTableLib
SortLib
PrintLib
PathLib
[Pcd.common]
gEfiShellPkgTokenSpaceGuid.PcdShellSupportLevel # ALWAYS_CONSUMED

View File

@ -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;

View File

@ -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
gShellLevel2HiiGuid

View File

@ -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

View File

@ -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