ASSERT(Arg != NULL);\r
ASSERT(ListHead != NULL);\r
\r
+ CleanFilePathStr = NULL;\r
+\r
Status = InternalShellStripQuotes (Arg, &CleanFilePathStr);\r
if (EFI_ERROR (Status)) {\r
return Status;\r
\r
@param[in] Name pointer to Name of parameter found\r
@param[in] AlwaysAllowNumbers TRUE to allow numbers, FALSE to not.\r
+ @param[in] TimeNumbers TRUE to allow numbers with ":", FALSE otherwise.\r
\r
@retval TRUE the Parameter is a flag.\r
@retval FALSE the Parameter not a flag.\r
EFIAPI\r
InternalIsFlag (\r
IN CONST CHAR16 *Name,\r
- IN BOOLEAN AlwaysAllowNumbers\r
+ IN CONST BOOLEAN AlwaysAllowNumbers,\r
+ IN CONST BOOLEAN TimeNumbers\r
)\r
{\r
//\r
//\r
// If we accept numbers then dont return TRUE. (they will be values)\r
//\r
- if (((Name[0] == L'-' || Name[0] == L'+') && InternalShellIsHexOrDecimalNumber(Name+1, FALSE, FALSE)) && AlwaysAllowNumbers) {\r
+ if (((Name[0] == L'-' || Name[0] == L'+') && InternalShellIsHexOrDecimalNumber(Name+1, FALSE, FALSE, TimeNumbers)) && AlwaysAllowNumbers) {\r
return (FALSE);\r
}\r
\r
// possibly trigger the next loop(s) to populate the value of this item\r
//\r
case TypeValue:\r
+ case TypeTimeValue:\r
GetItemValue = 1;\r
ValueSize = 0;\r
break;\r
ASSERT(GetItemValue == 0);\r
break;\r
}\r
- } else if (GetItemValue != 0 && !InternalIsFlag(Argv[LoopCounter], AlwaysAllowNumbers)) {\r
- ASSERT(CurrentItemPackage != NULL);\r
+ } else if (GetItemValue != 0 && CurrentItemPackage != NULL && !InternalIsFlag(Argv[LoopCounter], AlwaysAllowNumbers, (CONST BOOLEAN)(CurrentItemPackage->Type == TypeTimeValue))) {\r
//\r
// get the item VALUE for a previous flag\r
//\r
if (GetItemValue == 0) {\r
InsertHeadList(*CheckPackage, &CurrentItemPackage->Link);\r
}\r
- } else if (!InternalIsFlag(Argv[LoopCounter], AlwaysAllowNumbers) ){ //|| ProblemParam == NULL) {\r
+ } else if (!InternalIsFlag(Argv[LoopCounter], AlwaysAllowNumbers, FALSE)){\r
//\r
// add this one as a non-flag\r
//\r
\r
Hex = FALSE;\r
\r
- if (!InternalShellIsHexOrDecimalNumber(String, Hex, TRUE)) {\r
+ if (!InternalShellIsHexOrDecimalNumber(String, Hex, TRUE, FALSE)) {\r
Hex = TRUE;\r
}\r
\r
@param[in] String The string to evaluate.\r
@param[in] ForceHex TRUE - always assume hex.\r
@param[in] StopAtSpace TRUE to halt upon finding a space, FALSE to keep going.\r
+ @param[in] TimeNumbers TRUE to allow numbers with ":", FALSE otherwise.\r
\r
@retval TRUE It is all numeric (dec/hex) characters.\r
@retval FALSE There is a non-numeric character.\r
InternalShellIsHexOrDecimalNumber (\r
IN CONST CHAR16 *String,\r
IN CONST BOOLEAN ForceHex,\r
- IN CONST BOOLEAN StopAtSpace\r
+ IN CONST BOOLEAN StopAtSpace,\r
+ IN CONST BOOLEAN TimeNumbers\r
)\r
{\r
BOOLEAN Hex;\r
// loop through the remaining characters and use the lib function\r
//\r
for ( ; String != NULL && *String != CHAR_NULL && !(StopAtSpace && *String == L' ') ; String++){\r
+ if (TimeNumbers && (String[0] == L':')) {\r
+ continue;\r
+ }\r
if (Hex) {\r
if (!ShellIsHexaDecimalDigitCharacter(*String)) {\r
return (FALSE);\r
\r
Hex = ForceHex;\r
\r
- if (!InternalShellIsHexOrDecimalNumber(String, Hex, StopAtSpace)) {\r
+ if (!InternalShellIsHexOrDecimalNumber(String, Hex, StopAtSpace, FALSE)) {\r
if (!Hex) {\r
Hex = TRUE;\r
- if (!InternalShellIsHexOrDecimalNumber(String, Hex, StopAtSpace)) {\r
+ if (!InternalShellIsHexOrDecimalNumber(String, Hex, StopAtSpace, FALSE)) {\r
return (EFI_INVALID_PARAMETER);\r
}\r
} else {\r
//\r
// make sure we have something left that is numeric.\r
//\r
- if (Walker == NULL || *Walker == CHAR_NULL || !InternalShellIsHexOrDecimalNumber(Walker, Hex, StopAtSpace)) {\r
+ if (Walker == NULL || *Walker == CHAR_NULL || !InternalShellIsHexOrDecimalNumber(Walker, Hex, StopAtSpace, FALSE)) {\r
return (EFI_INVALID_PARAMETER);\r
}\r
\r