Fix UEFI commands to support input redirection from a file
When UEFI commands used input redirection from a file, not all
internal handles were initialized properly which caused some
command output to be displayed incorrectly (such as X being
displayed instead of the expected number/string).
@@ -348,8 +348,15 @@ UefiMain(
}
if (Argc == 1) {
+#ifndef OS_BUILD
+ /* Verify input was not redirected from a file */
+ if (ShellGetFileInfo(StdIn) == NULL) {
+#endif
HelpRequested = TRUE;
FullHelpRequested = TRUE;
+#ifndef OS_BUILD
+ }
+#endif
}
#ifndef OS_BUILD
