summaryrefslogtreecommitdiffstats
path: root/ShellPkg/Library/UefiShellLevel1CommandsLib
diff options
context:
space:
mode:
authorjcarsey <jcarsey@6f19259b-4bc3-4df7-8a09-765794883524>2011-06-30 22:58:53 +0000
committerjcarsey <jcarsey@6f19259b-4bc3-4df7-8a09-765794883524>2011-06-30 22:58:53 +0000
commitab94587a7d2cd89695f9190420daceae0d2b7446 (patch)
treed736759dc8ce225a8c7d1aa699703e6ca37a4a7e /ShellPkg/Library/UefiShellLevel1CommandsLib
parentf1518f69703e1086f346a6e9d8e5a59855954178 (diff)
downloadedk2-ab94587a7d2cd89695f9190420daceae0d2b7446.tar.gz
edk2-ab94587a7d2cd89695f9190420daceae0d2b7446.tar.bz2
edk2-ab94587a7d2cd89695f9190420daceae0d2b7446.zip
This refactors 3 functions out of ShellCommandLib and puts them into a new library (but as 2 functions instead of 3). This allows for users outside of the shell itself to have access to these functions.
1) Remove the 3 functions out of the shell's internal library (ShellCommandLib) 2) Add a new library class (PathLib) 3) Add an instance of this class (BasePathLib) 4) Change all internal shell callers to use this new library class. signed-off-by: jcarsey reviewed-by: jljusten git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@11936 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'ShellPkg/Library/UefiShellLevel1CommandsLib')
-rw-r--r--ShellPkg/Library/UefiShellLevel1CommandsLib/If.c6
-rw-r--r--ShellPkg/Library/UefiShellLevel1CommandsLib/UefiShellLevel1CommandsLib.inf1
2 files changed, 3 insertions, 4 deletions
diff --git a/ShellPkg/Library/UefiShellLevel1CommandsLib/If.c b/ShellPkg/Library/UefiShellLevel1CommandsLib/If.c
index 62c713e589..b7f423ff4d 100644
--- a/ShellPkg/Library/UefiShellLevel1CommandsLib/If.c
+++ b/ShellPkg/Library/UefiShellLevel1CommandsLib/If.c
@@ -14,6 +14,7 @@
#include "UefiShellLevel1CommandsLib.h"
#include <Library/PrintLib.h>
+#include <Library/PathLib.h>
typedef enum {
EndTagOr,
@@ -95,10 +96,7 @@ IsValidProfile (
CONST CHAR16 *TempLocation;
ProfilesString = ShellGetEnvironmentVariable(L"profiles");
- //
- // According to the Shell spec this is a required environment variable.
- //
- ASSERT(ProfileString != NULL);
+ ASSERT(ProfilesString != NULL);
TempLocation = StrStr(ProfilesString, String);
if ((TempLocation != NULL) && (*(TempLocation-1) == L';') && (*(TempLocation+StrLen(String)) == L';')) {
return (TRUE);
diff --git a/ShellPkg/Library/UefiShellLevel1CommandsLib/UefiShellLevel1CommandsLib.inf b/ShellPkg/Library/UefiShellLevel1CommandsLib/UefiShellLevel1CommandsLib.inf
index 8b04b7d369..3a62cc3c8e 100644
--- a/ShellPkg/Library/UefiShellLevel1CommandsLib/UefiShellLevel1CommandsLib.inf
+++ b/ShellPkg/Library/UefiShellLevel1CommandsLib/UefiShellLevel1CommandsLib.inf
@@ -50,6 +50,7 @@
UefiBootServicesTableLib
SortLib
PrintLib
+ PathLib
[Pcd.common]
gEfiShellPkgTokenSpaceGuid.PcdShellSupportLevel # ALWAYS_CONSUMED