When boot from Shell we can use '-delay [num]' as optional data. If blank space exist after '[num]' Shell will fail. This patch add error handling to avoid this failure.
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Qiu Shumin <shumin.qiu@intel.com>
Reviewed-by: Jaben Carsey <jaben.carsey@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@18431
6f19259b-4bc3-4df7-8a09-
765794883524
IN CONST CHAR16 EscapeCharacter\r
);\r
\r
+/**\r
+ Cleans off leading and trailing spaces and tabs.\r
+\r
+ @param[in] String pointer to the string to trim them off.\r
+**/\r
+EFI_STATUS\r
+EFIAPI\r
+TrimSpaces(\r
+ IN CHAR16 **String\r
+ );\r
+\r
#endif //_SHELL_INTERNAL_HEADER_\r
\r
//\r
// Populate Argc and Argv\r
//\r
+ TrimSpaces (&FullCommandLine);\r
Status = ParseCommandLineToArgs(FullCommandLine,\r
&(*NewShellParameters)->Argv,\r
&(*NewShellParameters)->Argc);\r