summaryrefslogtreecommitdiff
path: root/ShellPkg
diff options
context:
space:
mode:
authorChris Phillips <chrisp@hp.com>2013-11-15 18:44:29 +0000
committerjcarsey <jcarsey@6f19259b-4bc3-4df7-8a09-765794883524>2013-11-15 18:44:29 +0000
commit28cdb62bcd32c87d561b5ac1ea4785ad058065b4 (patch)
treea071945ac671d15273792015f76e117e9bb96ca5 /ShellPkg
parent13acebbdefedb58ffd9f8e90ebc740404dcd1726 (diff)
downloadedk2-platforms-28cdb62bcd32c87d561b5ac1ea4785ad058065b4.tar.xz
ShellPkg: Add DiskIO2, and fix GUID from string check to be case insensitive
- 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
Diffstat (limited to 'ShellPkg')
-rw-r--r--ShellPkg/Library/UefiHandleParsingLib/UefiHandleParsingLib.c10
-rw-r--r--ShellPkg/Library/UefiHandleParsingLib/UefiHandleParsingLib.h3
-rw-r--r--ShellPkg/Library/UefiHandleParsingLib/UefiHandleParsingLib.inf3
-rw-r--r--ShellPkg/Library/UefiHandleParsingLib/UefiHandleParsingLib.unibin24050 -> 24302 bytes
4 files changed, 14 insertions, 2 deletions
diff --git a/ShellPkg/Library/UefiHandleParsingLib/UefiHandleParsingLib.c b/ShellPkg/Library/UefiHandleParsingLib/UefiHandleParsingLib.c
index 515fab3294..8fd9c4b0bb 100644
--- a/ShellPkg/Library/UefiHandleParsingLib/UefiHandleParsingLib.c
+++ b/ShellPkg/Library/UefiHandleParsingLib/UefiHandleParsingLib.c
@@ -1,6 +1,7 @@
/** @file
Provides interface to advanced shell functionality for parsing both handle and protocol database.
+ Copyright (c) 2013 Hewlett-Packard Development Company, L.P.
Copyright (c) 2010 - 2013, Intel Corporation. All rights reserved.<BR>
This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
@@ -621,6 +622,11 @@ STATIC CONST GUID_INFO_BLOCK mGuidStringList[] = {
{STRING_TOKEN(STR_UC2), &gEfiUserCredential2ProtocolGuid, NULL},
//
+// UEFI 2.4
+//
+ {STRING_TOKEN(STR_DISK_IO2), &gEfiDiskIo2ProtocolGuid, NULL},
+
+//
// terminator
//
{STRING_TOKEN(STR_UNKNOWN_DEVICE), NULL, NULL},
@@ -753,7 +759,7 @@ GetGuidFromStringName(
if (PcdGetBool(PcdShellIncludeNtGuids)) {
for (ListWalker = mGuidStringListNT ; ListWalker != NULL && ListWalker->GuidId != NULL ; ListWalker++) {
String = HiiGetString(mHandleParsingHiiHandle, ListWalker->StringId, Lang);
- if (Name != NULL && String != NULL && StrCmp(Name, String)==0) {
+ if (Name != NULL && String != NULL && StringNoCaseCompare (&Name, &String) == 0) {
*Guid = ListWalker->GuidId;
}
SHELL_FREE_NON_NULL(String);
@@ -764,7 +770,7 @@ GetGuidFromStringName(
}
for (ListWalker = mGuidStringList ; ListWalker != NULL && ListWalker->GuidId != NULL ; ListWalker++) {
String = HiiGetString(mHandleParsingHiiHandle, ListWalker->StringId, Lang);
- if (Name != NULL && String != NULL && StrCmp(Name, String)==0) {
+ if (Name != NULL && String != NULL && StringNoCaseCompare (&Name, &String) == 0) {
*Guid = ListWalker->GuidId;
}
SHELL_FREE_NON_NULL(String);
diff --git a/ShellPkg/Library/UefiHandleParsingLib/UefiHandleParsingLib.h b/ShellPkg/Library/UefiHandleParsingLib/UefiHandleParsingLib.h
index 3b1ad2bac4..767e1e68f1 100644
--- a/ShellPkg/Library/UefiHandleParsingLib/UefiHandleParsingLib.h
+++ b/ShellPkg/Library/UefiHandleParsingLib/UefiHandleParsingLib.h
@@ -1,6 +1,7 @@
/** @file
Provides interface to advanced shell functionality for parsing both handle and protocol database.
+ Copyright (c) 2013 Hewlett-Packard Development Company, L.P.
Copyright (c) 2011 - 2012, Intel Corporation. All rights reserved.<BR>
This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
@@ -130,6 +131,7 @@
#include <Protocol/BlockIo2.h>
#include <Protocol/StorageSecurityCommand.h>
#include <Protocol/UserCredential2.h>
+#include <Protocol/DiskIo2.h>
#include <Library/HandleParsingLib.h>
#include <Library/UefiBootServicesTableLib.h>
@@ -143,6 +145,7 @@
#include <Library/UefiLib.h>
#include <Library/HiiLib.h>
#include <Library/ShellLib.h>
+#include <Library/SortLib.h>
typedef struct {
LIST_ENTRY Link;
diff --git a/ShellPkg/Library/UefiHandleParsingLib/UefiHandleParsingLib.inf b/ShellPkg/Library/UefiHandleParsingLib/UefiHandleParsingLib.inf
index 15226a0b2e..83f8733cde 100644
--- a/ShellPkg/Library/UefiHandleParsingLib/UefiHandleParsingLib.inf
+++ b/ShellPkg/Library/UefiHandleParsingLib/UefiHandleParsingLib.inf
@@ -1,5 +1,6 @@
## @file
# Provides interface to advanced shell functionality for parsing both handle and protocol database.
+# Copyright (c) 2013 Hewlett-Packard Development Company, L.P.
# Copyright (c) 2010 - 2012, Intel Corporation. All rights reserved. <BR>
#
# This program and the accompanying materials
@@ -47,6 +48,7 @@
PrintLib
UefiLib
HiiLib
+ SortLib
[Protocols]
gEfiSimpleFileSystemProtocolGuid ##CONSUMES
@@ -167,6 +169,7 @@
gEfiTcgProtocolGuid ##UNDEFINED
gEfiHiiPackageListProtocolGuid ##UNDEFINED
gEfiDriverFamilyOverrideProtocolGuid ##UNDEFINED
+ gEfiDiskIo2ProtocolGuid ##UNDEFINED
[Guids]
gEfiFileInfoGuid ##CONSUMES
diff --git a/ShellPkg/Library/UefiHandleParsingLib/UefiHandleParsingLib.uni b/ShellPkg/Library/UefiHandleParsingLib/UefiHandleParsingLib.uni
index 6a9074eafe..eed23c9300 100644
--- a/ShellPkg/Library/UefiHandleParsingLib/UefiHandleParsingLib.uni
+++ b/ShellPkg/Library/UefiHandleParsingLib/UefiHandleParsingLib.uni
Binary files differ