]> git.proxmox.com Git - mirror_edk2.git/commitdiff
ShellPkg: Add DiskIO2, and fix GUID from string check to be case insensitive
authorChris Phillips <chrisp@hp.com>
Fri, 15 Nov 2013 18:44:29 +0000 (18:44 +0000)
committerjcarsey <jcarsey@6f19259b-4bc3-4df7-8a09-765794883524>
Fri, 15 Nov 2013 18:44:29 +0000 (18:44 +0000)
- Add DiskIO2 to list of known protocols
- Fix string check to be case insensitive for commands like ‘dh –p protocolname’

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Chris Phillips <chrisp@hp.com>
Reviewed-by: Jaben Carsey <jaben.carsey@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@14851 6f19259b-4bc3-4df7-8a09-765794883524

ShellPkg/Library/UefiHandleParsingLib/UefiHandleParsingLib.c
ShellPkg/Library/UefiHandleParsingLib/UefiHandleParsingLib.h
ShellPkg/Library/UefiHandleParsingLib/UefiHandleParsingLib.inf
ShellPkg/Library/UefiHandleParsingLib/UefiHandleParsingLib.uni

index 515fab3294d1dd4ce2c93168df937f3c04c9fbc3..8fd9c4b0bbc35f88651f99aeac4ebb49c37a12e3 100644 (file)
@@ -1,6 +1,7 @@
 /** @file\r
   Provides interface to advanced shell functionality for parsing both handle and protocol database.\r
 \r
+  Copyright (c) 2013 Hewlett-Packard Development Company, L.P.\r
   Copyright (c) 2010 - 2013, 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
@@ -620,6 +621,11 @@ STATIC CONST GUID_INFO_BLOCK mGuidStringList[] = {
   {STRING_TOKEN(STR_SSC),                   &gEfiStorageSecurityCommandProtocolGuid,          NULL},\r
   {STRING_TOKEN(STR_UC2),                   &gEfiUserCredential2ProtocolGuid,                 NULL},\r
 \r
+//\r
+// UEFI 2.4\r
+//\r
+  {STRING_TOKEN(STR_DISK_IO2),              &gEfiDiskIo2ProtocolGuid,                         NULL},\r
+\r
 //\r
 // terminator\r
 //\r
@@ -753,7 +759,7 @@ GetGuidFromStringName(
   if (PcdGetBool(PcdShellIncludeNtGuids)) {\r
     for (ListWalker = mGuidStringListNT ; ListWalker != NULL && ListWalker->GuidId != NULL ; ListWalker++) {\r
       String = HiiGetString(mHandleParsingHiiHandle, ListWalker->StringId, Lang);\r
-      if (Name != NULL && String != NULL && StrCmp(Name, String)==0) {\r
+      if (Name != NULL && String != NULL && StringNoCaseCompare (&Name, &String) == 0) {\r
         *Guid = ListWalker->GuidId;\r
       }\r
       SHELL_FREE_NON_NULL(String);\r
@@ -764,7 +770,7 @@ GetGuidFromStringName(
   }\r
   for (ListWalker = mGuidStringList ; ListWalker != NULL && ListWalker->GuidId != NULL ; ListWalker++) {\r
     String = HiiGetString(mHandleParsingHiiHandle, ListWalker->StringId, Lang);\r
-    if (Name != NULL && String != NULL && StrCmp(Name, String)==0) {\r
+    if (Name != NULL && String != NULL && StringNoCaseCompare (&Name, &String) == 0) {\r
       *Guid = ListWalker->GuidId;\r
     }\r
     SHELL_FREE_NON_NULL(String);\r
index 3b1ad2bac469159b4275d63159d4206e76554898..767e1e68f1c118e3a5905d0a56a0bd9328bf2e3d 100644 (file)
@@ -1,6 +1,7 @@
 /** @file\r
   Provides interface to advanced shell functionality for parsing both handle and protocol database.\r
 \r
+  Copyright (c) 2013 Hewlett-Packard Development Company, L.P.\r
   Copyright (c) 2011 - 2012, 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
 #include <Protocol/BlockIo2.h>\r
 #include <Protocol/StorageSecurityCommand.h>\r
 #include <Protocol/UserCredential2.h>\r
+#include <Protocol/DiskIo2.h>\r
 \r
 #include <Library/HandleParsingLib.h>\r
 #include <Library/UefiBootServicesTableLib.h>\r
 #include <Library/UefiLib.h>\r
 #include <Library/HiiLib.h>\r
 #include <Library/ShellLib.h>\r
+#include <Library/SortLib.h>\r
 \r
 typedef struct {\r
   LIST_ENTRY  Link;\r
index 15226a0b2efa00078b65b6e2abe31352e8f9191b..83f8733cde6e2eb8c96e5340f180f9747ddae589 100644 (file)
@@ -1,5 +1,6 @@
 ##  @file\r
 #  Provides interface to advanced shell functionality for parsing both handle and protocol database.\r
+#  Copyright (c) 2013 Hewlett-Packard Development Company, L.P.\r
 #  Copyright (c) 2010 - 2012, Intel Corporation. All rights reserved. <BR>\r
 #\r
 #  This program and the accompanying materials\r
@@ -47,6 +48,7 @@
   PrintLib\r
   UefiLib\r
   HiiLib\r
+  SortLib\r
 \r
 [Protocols]\r
   gEfiSimpleFileSystemProtocolGuid                        ##CONSUMES\r
   gEfiTcgProtocolGuid                                     ##UNDEFINED\r
   gEfiHiiPackageListProtocolGuid                          ##UNDEFINED\r
   gEfiDriverFamilyOverrideProtocolGuid                    ##UNDEFINED\r
+  gEfiDiskIo2ProtocolGuid                                 ##UNDEFINED\r
 \r
 [Guids]\r
   gEfiFileInfoGuid                                        ##CONSUMES\r
index 6a9074eafe6e10599e3e6d65780f3e280287f9fe..eed23c93001253faa8f840ac59643871d6ba1af8 100644 (file)
Binary files a/ShellPkg/Library/UefiHandleParsingLib/UefiHandleParsingLib.uni and b/ShellPkg/Library/UefiHandleParsingLib/UefiHandleParsingLib.uni differ