/** @file\r
A shell application that triggers capsule update process.\r
\r
- Copyright (c) 2016, Intel Corporation. All rights reserved.<BR>\r
+ Copyright (c) 2016 - 2017, Intel Corporation. All rights reserved.<BR>\r
This program and the accompanying materials\r
are licensed and made available under the terms and conditions of the BSD License\r
which accompanies this distribution. The full text of the license may be found at\r
IN VOID *Buffer\r
);\r
\r
-/**\r
- Converts a string to GUID value.\r
- Guid Format is xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx\r
-\r
- @param[in] Str The registry format GUID string that contains the GUID value.\r
- @param[out] Guid A pointer to the converted GUID value.\r
-\r
- @retval EFI_SUCCESS The GUID string was successfully converted to the GUID value.\r
- @retval EFI_UNSUPPORTED The input string is not in registry format.\r
- @return others Some error occurred when converting part of GUID value.\r
-\r
-**/\r
-EFI_STATUS\r
-StrToGuid (\r
- IN CHAR16 *Str,\r
- OUT EFI_GUID *Guid\r
- );\r
-\r
/**\r
\r
This function parse application ARG.\r
)\r
{\r
EFI_STATUS Status;\r
+ RETURN_STATUS RStatus;\r
UINTN FileSize[MAX_CAPSULE_NUM];\r
VOID *CapsuleBuffer[MAX_CAPSULE_NUM];\r
EFI_CAPSULE_BLOCK_DESCRIPTOR *BlockDescriptors;\r
//\r
// FMP->GetImage()\r
//\r
- Status = StrToGuid(Argv[3], &ImageTypeId);\r
- if (EFI_ERROR(Status)) {\r
+ RStatus = StrToGuid (Argv[3], &ImageTypeId);\r
+ if (RETURN_ERROR (RStatus) || (Argv[3][GUID_STRING_LENGTH] != L'\0')) {\r
Print (L"Invalid ImageTypeId - %s\n", Argv[3]);\r
- return Status;\r
+ return EFI_INVALID_PARAMETER;\r
}\r
ImageIndex = StrDecimalToUintn(Argv[4]);\r
if (StrCmp(Argv[5], L"-O") == 0) {\r