+/**\r
+ Get the GUID value from a human readable name.\r
+\r
+ If GuidName is a known GUID name, then update Guid to have the correct value for\r
+ that GUID.\r
+\r
+ This function is only available when the major and minor versions in the\r
+ EfiShellProtocol are greater than or equal to 2 and 1, respectively.\r
+\r
+ @param[in] GuidName A pointer to the localized name for the GUID being queried.\r
+ @param[out] Guid A pointer to the GUID structure to be filled in.\r
+\r
+ @retval EFI_SUCCESS The operation was successful.\r
+ @retval EFI_INVALID_PARAMETER Guid was NULL.\r
+ @retval EFI_INVALID_PARAMETER GuidName was NULL.\r
+ @retval EFI_NOT_FOUND GuidName is not a known GUID Name.\r
+**/\r
+EFI_STATUS\r
+EFIAPI \r
+EfiShellGetGuidFromName(\r
+ IN CONST CHAR16 *GuidName,\r
+ OUT EFI_GUID *Guid\r
+ )\r
+{\r
+ EFI_GUID *NewGuid;\r
+ EFI_STATUS Status;\r
+\r
+ if (Guid == NULL || GuidName == NULL) {\r
+ return (EFI_INVALID_PARAMETER);\r
+ }\r
+ \r
+ Status = GetGuidFromStringName(GuidName, NULL, &NewGuid);\r
+\r
+ if (!EFI_ERROR(Status)) {\r
+ CopyGuid(NewGuid, Guid);\r
+ }\r
+\r
+ return (Status);\r
+}\r
+\r
+/**\r
+ Get the human readable name for a GUID from the value.\r
+\r
+ If Guid is assigned a name, then update *GuidName to point to the name. The callee\r
+ should not modify the value.\r
+\r
+ This function is only available when the major and minor versions in the\r
+ EfiShellProtocol are greater than or equal to 2 and 1, respectively.\r
+\r
+ @param[in] Guid A pointer to the GUID being queried.\r
+ @param[out] GuidName A pointer to a pointer the localized to name for the GUID being requested\r
+\r
+ @retval EFI_SUCCESS The operation was successful.\r
+ @retval EFI_INVALID_PARAMETER Guid was NULL.\r
+ @retval EFI_INVALID_PARAMETER GuidName was NULL.\r
+ @retval EFI_NOT_FOUND Guid is not assigned a name.\r
+**/\r
+EFI_STATUS\r
+EFIAPI \r
+EfiShellGetGuidName(\r
+ IN CONST EFI_GUID *Guid,\r
+ OUT CONST CHAR16 **GuidName\r
+ )\r
+{\r
+ CHAR16 *Name;\r
+\r
+ if (Guid == NULL || GuidName == NULL) {\r
+ return (EFI_INVALID_PARAMETER);\r
+ }\r
+\r
+ Name = GetStringNameFromGuid(Guid, NULL);\r
+ if (Name == NULL || StrLen(Name) == 0) {\r
+ SHELL_FREE_NON_NULL(Name);\r
+ return (EFI_NOT_FOUND);\r
+ }\r
+\r
+ *GuidName = AddBufferToFreeList(Name);\r
+\r
+ return (EFI_SUCCESS);\r
+}\r
+\r