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>
This commit is contained in:
Tapan Shah
2016-09-22 12:12:47 -07:00
committed by Jaben Carsey
parent 38707d76fc
commit 583448b441
5 changed files with 23 additions and 4 deletions

View File

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