]> git.proxmox.com Git - mirror_edk2.git/blobdiff - ShellPkg/Library/UefiShellDebug1CommandsLib/DmpStore.c
ShellPkg/Debug1CommandLib: Use StrToGuid/StrHexToBytes in BaseLib
[mirror_edk2.git] / ShellPkg / Library / UefiShellDebug1CommandsLib / DmpStore.c
index bb2c0b98ec6fdceccb383ad1734ef0649240fdac..701ff7505f2158f3d59923c2127fe20639270c08 100644 (file)
@@ -2,7 +2,7 @@
   Main file for DmpStore shell Debug1 function.\r
    \r
   (C) Copyright 2013-2015 Hewlett-Packard Development Company, L.P.<BR>\r
-  Copyright (c) 2005 - 2016, Intel Corporation. All rights reserved.<BR>\r
+  Copyright (c) 2005 - 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
@@ -676,6 +676,7 @@ ShellCommandRunDmpStore (
   )\r
 {\r
   EFI_STATUS        Status;\r
+  RETURN_STATUS     RStatus;\r
   LIST_ENTRY        *Package;\r
   CHAR16            *ProblemParam;\r
   SHELL_STATUS      ShellStatus;\r
@@ -728,8 +729,8 @@ ShellCommandRunDmpStore (
       if (!ShellCommandLineGetFlag(Package, L"-all")) {\r
         GuidStr = ShellCommandLineGetValue(Package, L"-guid");\r
         if (GuidStr != NULL) {\r
-          Status = ConvertStringToGuid(GuidStr, &GuidData);\r
-          if (EFI_ERROR(Status)) {\r
+          RStatus = StrToGuid (GuidStr, &GuidData);\r
+          if (RETURN_ERROR (RStatus) || (GuidStr[GUID_STRING_LENGTH] != L'\0')) {\r
             ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_PARAM_INV), gShellDebug1HiiHandle, L"dmpstore", GuidStr);  \r
             ShellStatus = SHELL_INVALID_PARAMETER;\r
           }\r