50 ChildHandleBuffer =
NULL;
53 ASSERT (TheHandle !=
NULL);
54 ASSERT (HiiString !=
NULL);
64 Status =
gBS->OpenProtocol (
66 &gEfiDriverBindingProtocolGuid,
70 EFI_OPEN_PROTOCOL_TEST_PROTOCOL
72 if (!EFI_ERROR (Status)) {
76 Status =
gBS->OpenProtocol (
78 &gEfiLoadedImageProtocolGuid,
82 EFI_OPEN_PROTOCOL_TEST_PROTOCOL
84 if (!EFI_ERROR (Status)) {
89 if (FormatString ==
NULL) {
99 UnicodeSPrint (FormatString,
StrSize (HiiString) + (10)*
sizeof (FormatString[0]), L
"%%%ds %s", IndentCharCount, HiiString);
100 gEfiShellProtocol->GetDeviceName ((
EFI_HANDLE)TheHandle, !UseDevPaths ? EFI_DEVICE_NAME_USE_COMPONENT_NAME|EFI_DEVICE_NAME_USE_DEVICE_PATH : EFI_DEVICE_NAME_USE_DEVICE_PATH, (CHAR8 *)Lang, &Name);
110 Name ==
NULL ? L
"Unknown" : Name
122 for (LoopVar = 0; LoopVar < ChildCount && ShellStatus ==
SHELL_SUCCESS; LoopVar++) {
123 ShellStatus =
DoDevTreeForHandle (ChildHandleBuffer[LoopVar], Lang, UseDevPaths, IndentCharCount+2, HiiString);
129 if (ChildHandleBuffer !=
NULL) {
133 return (ShellStatus);
151 CHAR16 *ProblemParam;
160 UINTN ParentControllerHandleCount;
180 if (EFI_ERROR (Status)) {
181 if ((Status == EFI_VOLUME_CORRUPTED) && (ProblemParam !=
NULL)) {
198 if (Language ==
NULL) {
206 ASSERT (Language ==
NULL);
210 ASSERT (Language ==
NULL);
221 if (HiiString ==
NULL) {
222 ASSERT (HiiString !=
NULL);
223 SHELL_FREE_NON_NULL (Language);
229 for (LoopVar = 1; ; LoopVar++) {
231 if (TheHandle ==
NULL) {
238 Status =
gBS->OpenProtocol (
240 &gEfiDevicePathProtocolGuid,
244 EFI_OPEN_PROTOCOL_TEST_PROTOCOL
246 if (EFI_ERROR (Status)) {
253 ParentControllerHandleBuffer =
NULL;
256 &ParentControllerHandleCount,
257 &ParentControllerHandleBuffer
259 SHELL_FREE_NON_NULL (ParentControllerHandleBuffer);
260 if (ParentControllerHandleCount > 0) {
279 if (HiiString !=
NULL) {
283 SHELL_FREE_NON_NULL (Language);
287 return (ShellStatus);
UINTN EFIAPI StrSize(IN CONST CHAR16 *String)
SHELL_STATUS DoDevTreeForHandle(IN CONST EFI_HANDLE TheHandle, IN CONST CHAR8 *Lang OPTIONAL, IN CONST BOOLEAN UseDevPaths, IN CONST UINTN IndentCharCount, IN CONST CHAR16 *HiiString)
SHELL_STATUS EFIAPI ShellCommandRunDevTree(IN EFI_HANDLE ImageHandle, IN EFI_SYSTEM_TABLE *SystemTable)
VOID *EFIAPI AllocateZeroPool(IN UINTN AllocationSize)
VOID EFIAPI FreePool(IN VOID *Buffer)
EFI_HANDLE EFIAPI ConvertHandleIndexToHandle(IN CONST UINTN TheIndex)
#define PARSE_HANDLE_DATABASE_PARENTS(ControllerHandle, Count, Buffer)
UINTN EFIAPI ConvertHandleToHandleIndex(IN CONST EFI_HANDLE TheHandle)
EFI_STATUS EFIAPI ParseHandleDatabaseForChildControllers(IN CONST EFI_HANDLE ControllerHandle, OUT UINTN *MatchingHandleCount, OUT EFI_HANDLE **MatchingHandleBuffer OPTIONAL)
EFI_STRING EFIAPI HiiGetString(IN EFI_HII_HANDLE HiiHandle, IN EFI_STRING_ID StringId, IN CONST CHAR8 *Language OPTIONAL)
UINTN EFIAPI UnicodeSPrint(OUT CHAR16 *StartOfBuffer, IN UINTN BufferSize, IN CONST CHAR16 *FormatString,...)
UINTN EFIAPI AsciiSPrint(OUT CHAR8 *StartOfBuffer, IN UINTN BufferSize, IN CONST CHAR8 *FormatString,...)
#define ASSERT_EFI_ERROR(StatusParameter)
@ SHELL_INVALID_PARAMETER
EFI_STATUS EFIAPI CommandInit(VOID)
CONST CHAR16 *EFIAPI ShellCommandLineGetValue(IN CONST LIST_ENTRY *CheckPackage, IN CHAR16 *KeyString)
BOOLEAN EFIAPI ShellGetExecutionBreakFlag(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,...)
BOOLEAN EFIAPI ShellCommandLineGetFlag(IN CONST LIST_ENTRY *CONST CheckPackage, IN CONST CHAR16 *CONST KeyString)
@ TypeValue
A flag that has some data following it with a space (IE "-a 1").
@ TypeFlag
A flag that is present or not present only (IE "-a").
VOID EFIAPI ShellCommandLineFreeVarList(IN LIST_ENTRY *CheckPackage)
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)