summaryrefslogtreecommitdiffstats
path: root/ShellPkg/Application
diff options
context:
space:
mode:
authorTapan Shah <tapandshah@hpe.com>2016-09-22 12:12:47 -0700
committerJaben Carsey <jaben.carsey@intel.com>2016-09-22 14:17:24 -0700
commit583448b441650f9a7cb29a320d52db96df81e043 (patch)
tree91c638cab5ae9eaffed9e9b6ba17a161c181e3f7 /ShellPkg/Application
parent38707d76fc8fd07071b1c47c49d116c9445aa619 (diff)
downloadedk2-583448b441650f9a7cb29a320d52db96df81e043.tar.gz
edk2-583448b441650f9a7cb29a320d52db96df81e043.tar.bz2
edk2-583448b441650f9a7cb29a320d52db96df81e043.zip
ShellPkg: Expand special output file to include "NULL" and case insensitive
As per ECR 1349 change in UEFI Shell Specification 2.2, expanding a special output file name to include "NULL". Previously it only supported "NUL" as a special output file and it was case sensitive. With this change both "NUL" and "NULL" are special output file and checked as case insensitive. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Tapan Shah <tapandshah@hpe.com> Reviewed-by: Jaben Carsey <jaben.carsey@intel.com>
Diffstat (limited to 'ShellPkg/Application')
-rw-r--r--ShellPkg/Application/Shell/ShellParametersProtocol.c3
-rw-r--r--ShellPkg/Application/Shell/ShellProtocol.c6
2 files changed, 6 insertions, 3 deletions
diff --git a/ShellPkg/Application/Shell/ShellParametersProtocol.c b/ShellPkg/Application/Shell/ShellParametersProtocol.c
index 3684f9cd82..58156a21bd 100644
--- a/ShellPkg/Application/Shell/ShellParametersProtocol.c
+++ b/ShellPkg/Application/Shell/ShellParametersProtocol.c
@@ -2,6 +2,7 @@
Member functions of EFI_SHELL_PARAMETERS_PROTOCOL and functions for creation,
manipulation, and initialization of EFI_SHELL_PARAMETERS_PROTOCOL.
+ (C) Copyright 2016 Hewlett Packard Enterprise Development LP<BR>
Copyright (C) 2014, Red Hat, Inc.
(C) Copyright 2013 Hewlett-Packard Development Company, L.P.<BR>
Copyright (c) 2009 - 2016, Intel Corporation. All rights reserved.<BR>
@@ -1174,7 +1175,7 @@ UpdateStdInStdOutStdErr(
if (TempHandle == NULL) {
Status = EFI_INVALID_PARAMETER;
} else {
- if (StrStr(StdOutFileName, L"NUL")==StdOutFileName) {
+ if (gUnicodeCollation->MetaiMatch (gUnicodeCollation, StdOutFileName, L"NUL")) {
//no-op
} else if (!OutAppend && OutUnicode && !EFI_ERROR(Status)) {
Status = WriteFileTag (TempHandle);
diff --git a/ShellPkg/Application/Shell/ShellProtocol.c b/ShellPkg/Application/Shell/ShellProtocol.c
index 6f292507a9..fb7dd84e5a 100644
--- a/ShellPkg/Application/Shell/ShellProtocol.c
+++ b/ShellPkg/Application/Shell/ShellProtocol.c
@@ -3,6 +3,7 @@
manipulation, and initialization of EFI_SHELL_PROTOCOL.
(C) Copyright 2014 Hewlett-Packard Development Company, L.P.<BR>
+ (C) Copyright 2016 Hewlett Packard Enterprise Development LP<BR>
Copyright (c) 2009 - 2016, 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
@@ -1287,9 +1288,10 @@ EfiShellOpenFileByName(
}
//
- // Is this for NUL file
+ // Is this for NUL / NULL file
//
- if (StrCmp(FileName, L"NUL") == 0) {
+ if ((gUnicodeCollation->StriColl (gUnicodeCollation, (CHAR16*)FileName, L"NUL") == 0) ||
+ (gUnicodeCollation->StriColl (gUnicodeCollation, (CHAR16*)FileName, L"NULL") == 0)) {
*FileHandle = &FileInterfaceNulFile;
return (EFI_SUCCESS);
}