summaryrefslogtreecommitdiff
path: root/ShellPkg/Application
diff options
context:
space:
mode:
Diffstat (limited to 'ShellPkg/Application')
-rw-r--r--ShellPkg/Application/Shell/ShellProtocol.c39
1 files changed, 9 insertions, 30 deletions
diff --git a/ShellPkg/Application/Shell/ShellProtocol.c b/ShellPkg/Application/Shell/ShellProtocol.c
index f2ca202..9e9e6dc 100644
--- a/ShellPkg/Application/Shell/ShellProtocol.c
+++ b/ShellPkg/Application/Shell/ShellProtocol.c
@@ -2924,36 +2924,15 @@ EfiShellSetEnv(
//
// Make sure we dont 'set' a predefined read only variable
//
- if (gUnicodeCollation->StriColl(
- gUnicodeCollation,
- (CHAR16*)Name,
- L"cwd") == 0
- ||gUnicodeCollation->StriColl(
- gUnicodeCollation,
- (CHAR16*)Name,
- L"Lasterror") == 0
- ||gUnicodeCollation->StriColl(
- gUnicodeCollation,
- (CHAR16*)Name,
- L"profiles") == 0
- ||gUnicodeCollation->StriColl(
- gUnicodeCollation,
- (CHAR16*)Name,
- L"uefishellsupport") == 0
- ||gUnicodeCollation->StriColl(
- gUnicodeCollation,
- (CHAR16*)Name,
- L"uefishellversion") == 0
- ||gUnicodeCollation->StriColl(
- gUnicodeCollation,
- (CHAR16*)Name,
- L"uefiversion") == 0
- ||(!ShellInfoObject.ShellInitSettings.BitUnion.Bits.NoNest &&
- gUnicodeCollation->StriColl(
- gUnicodeCollation,
- (CHAR16*)Name,
- (CHAR16*)mNoNestingEnvVarName) == 0)
- ){
+ if ((StrCmp (Name, L"cwd") == 0) ||
+ (StrCmp (Name, L"lasterror") == 0) ||
+ (StrCmp (Name, L"profiles") == 0) ||
+ (StrCmp (Name, L"uefishellsupport") == 0) ||
+ (StrCmp (Name, L"uefishellversion") == 0) ||
+ (StrCmp (Name, L"uefiversion") == 0) ||
+ (!ShellInfoObject.ShellInitSettings.BitUnion.Bits.NoNest &&
+ StrCmp (Name, mNoNestingEnvVarName) == 0)
+ ) {
return (EFI_INVALID_PARAMETER);
}
return (InternalEfiShellSetEnv(Name, Value, Volatile));