17STATIC CONST CHAR16 StringExclusive[] = L
"Exclusive";
42 CONST CHAR16 *OpenTypeString;
46 UINTN ControllerIndex;
48 if (TheHandle ==
NULL) {
49 return (EFI_INVALID_PARAMETER);
55 Status =
gBS->ProtocolsPerHandle (
61 if (!EFI_ERROR (Status)) {
62 for (ProtocolIndex = 0; ProtocolIndex < ArrayCount; ProtocolIndex++) {
67 if (TempString ==
NULL) {
77 Status =
gBS->OpenProtocolInformation (
79 ProtocolGuidArray[ProtocolIndex],
84 if (!EFI_ERROR (Status)) {
85 for (OpenInfoIndex = 0; OpenInfoIndex < OpenInfoCount; OpenInfoIndex++) {
86 switch (OpenInfo[OpenInfoIndex].Attributes) {
87 case EFI_OPEN_PROTOCOL_BY_HANDLE_PROTOCOL: OpenTypeString = StringHandProt;
89 case EFI_OPEN_PROTOCOL_GET_PROTOCOL: OpenTypeString = StringGetProt;
91 case EFI_OPEN_PROTOCOL_TEST_PROTOCOL: OpenTypeString = StringTestProt;
93 case EFI_OPEN_PROTOCOL_BY_CHILD_CONTROLLER: OpenTypeString = StringChild;
95 case EFI_OPEN_PROTOCOL_BY_DRIVER: OpenTypeString = StringDriver;
97 case EFI_OPEN_PROTOCOL_EXCLUSIVE: OpenTypeString = StringExclusive;
99 case EFI_OPEN_PROTOCOL_BY_DRIVER|EFI_OPEN_PROTOCOL_EXCLUSIVE:
100 OpenTypeString = StringDriverEx;
102 default: OpenTypeString = StringUnknown;
107 if (HandleIndex == 0) {
110 return EFI_OUT_OF_RESOURCES;
115 if ((ControllerIndex != 0) && (Name !=
NULL)) {
121 gShellDriver1HiiHandle,
124 OpenInfo[OpenInfoIndex].OpenCount,
134 gShellDriver1HiiHandle,
136 OpenInfo[OpenInfoIndex].OpenCount,
168 CHAR16 *ProblemParam;
171 CONST CHAR16 *Param1;
189 if (EFI_ERROR (Status)) {
190 if ((Status == EFI_VOLUME_CORRUPTED) && (ProblemParam !=
NULL)) {
209 if (Param1 !=
NULL) {
218 if (TheHandle ==
NULL) {
219 ASSERT (TheHandle !=
NULL);
227 if (!EFI_ERROR (Status)) {
236 return (ShellStatus);
VOID EFIAPI FreePool(IN VOID *Buffer)
CONST CHAR16 *EFIAPI GetStringNameFromHandle(IN CONST EFI_HANDLE TheHandle, IN CONST CHAR8 *Language)
CHAR16 *EFIAPI GetStringNameFromGuid(IN CONST EFI_GUID *Guid, IN CONST CHAR8 *Lang OPTIONAL)
EFI_HANDLE EFIAPI ConvertHandleIndexToHandle(IN CONST UINTN TheIndex)
UINTN EFIAPI ConvertHandleToHandleIndex(IN CONST EFI_HANDLE TheHandle)
#define ASSERT_EFI_ERROR(StatusParameter)
@ SHELL_INVALID_PARAMETER
EFI_STATUS TraverseHandleDatabase(IN CONST EFI_HANDLE TheHandle)
SHELL_STATUS EFIAPI ShellCommandRunOpenInfo(IN EFI_HANDLE ImageHandle, IN EFI_SYSTEM_TABLE *SystemTable)
EFI_STATUS EFIAPI CommandInit(VOID)
#define ShellCommandLineParse(CheckList, CheckPackage, ProblemParam, AutoPageBreak)
Make it easy to upgrade from older versions of the shell library.
EFI_STATUS EFIAPI ShellPrintHiiEx(IN INT32 Col OPTIONAL, IN INT32 Row OPTIONAL, IN CONST CHAR8 *Language OPTIONAL, IN CONST EFI_STRING_ID HiiFormatStringId, IN CONST EFI_HII_HANDLE HiiFormatHandle,...)
EFI_STATUS EFIAPI ShellInitialize(VOID)
EFI_STATUS EFIAPI ShellPrintEx(IN INT32 Col OPTIONAL, IN INT32 Row OPTIONAL, IN CONST CHAR16 *Format,...)
CONST CHAR16 *EFIAPI ShellCommandLineGetRawValue(IN CONST LIST_ENTRY *CONST CheckPackage, IN UINTN Position)
UINTN EFIAPI ShellCommandLineGetCount(IN CONST LIST_ENTRY *CheckPackage)
EFI_STATUS EFIAPI ShellConvertStringToUint64(IN CONST CHAR16 *String, OUT UINT64 *Value, IN CONST BOOLEAN ForceHex, IN CONST BOOLEAN StopAtSpace)
SHELL_PARAM_ITEM EmptyParamList[]
Helper structure for no parameters (besides -? and -b)