VirtualBox

source: vbox/trunk/src/VBox/Devices/EFI/FirmwareNew/ShellPkg/Library/UefiShellLevel1CommandsLib/UefiShellLevel1CommandsLib.h@ 108793

Last change on this file since 108793 was 105670, checked in by vboxsync, 9 months ago

Devices/EFI/FirmwareNew: Merge edk2-stable-202405 and make it build on aarch64, bugref:4643

  • Property svn:eol-style set to native
File size: 5.4 KB
Line 
1/** @file
2 Main file for NULL named library for level 1 shell command functions.
3
4 Copyright (c) 2009 - 2018, Intel Corporation. All rights reserved.<BR>
5 SPDX-License-Identifier: BSD-2-Clause-Patent
6
7**/
8
9#ifndef _UEFI_SHELL_LEVEL1_COMMANDS_LIB_H_
10#define _UEFI_SHELL_LEVEL1_COMMANDS_LIB_H_
11
12#include <Uefi.h>
13
14#include <Guid/ShellLibHiiGuid.h>
15
16#include <Protocol/Shell.h>
17#include <Protocol/ShellParameters.h>
18#include <Protocol/DevicePath.h>
19#include <Protocol/LoadedImage.h>
20#include <Protocol/UnicodeCollation.h>
21
22#include <Library/BaseLib.h>
23#include <Library/BaseMemoryLib.h>
24#include <Library/DebugLib.h>
25#include <Library/MemoryAllocationLib.h>
26#include <Library/PcdLib.h>
27#include <Library/ShellCommandLib.h>
28#include <Library/ShellLib.h>
29#include <Library/SortLib.h>
30#include <Library/UefiLib.h>
31#include <Library/UefiRuntimeServicesTableLib.h>
32#include <Library/UefiBootServicesTableLib.h>
33#include <Library/HiiLib.h>
34#include <Library/FileHandleLib.h>
35
36extern EFI_HII_HANDLE gShellLevel1HiiHandle;
37
38/**
39 Function for 'stall' command.
40
41 @param[in] ImageHandle Handle to the Image (NULL if Internal).
42 @param[in] SystemTable Pointer to the System Table (NULL if Internal).
43**/
44SHELL_STATUS
45EFIAPI
46ShellCommandRunStall (
47 IN EFI_HANDLE ImageHandle,
48 IN EFI_SYSTEM_TABLE *SystemTable
49 );
50
51/**
52 Function for 'exit' command.
53
54 @param[in] ImageHandle Handle to the Image (NULL if Internal).
55 @param[in] SystemTable Pointer to the System Table (NULL if Internal).
56**/
57SHELL_STATUS
58EFIAPI
59ShellCommandRunExit (
60 IN EFI_HANDLE ImageHandle,
61 IN EFI_SYSTEM_TABLE *SystemTable
62 );
63
64/**
65 Function for 'endif' command.
66
67 @param[in] ImageHandle Handle to the Image (NULL if Internal).
68 @param[in] SystemTable Pointer to the System Table (NULL if Internal).
69**/
70SHELL_STATUS
71EFIAPI
72ShellCommandRunEndIf (
73 IN EFI_HANDLE ImageHandle,
74 IN EFI_SYSTEM_TABLE *SystemTable
75 );
76
77/**
78 Function for 'for' command.
79
80 @param[in] ImageHandle Handle to the Image (NULL if Internal).
81 @param[in] SystemTable Pointer to the System Table (NULL if Internal).
82**/
83SHELL_STATUS
84EFIAPI
85ShellCommandRunFor (
86 IN EFI_HANDLE ImageHandle,
87 IN EFI_SYSTEM_TABLE *SystemTable
88 );
89
90/**
91 Function for 'endfor' command.
92
93 @param[in] ImageHandle Handle to the Image (NULL if Internal).
94 @param[in] SystemTable Pointer to the System Table (NULL if Internal).
95**/
96SHELL_STATUS
97EFIAPI
98ShellCommandRunEndFor (
99 IN EFI_HANDLE ImageHandle,
100 IN EFI_SYSTEM_TABLE *SystemTable
101 );
102
103/**
104 Function for 'if' command.
105
106 @param[in] ImageHandle Handle to the Image (NULL if Internal).
107 @param[in] SystemTable Pointer to the System Table (NULL if Internal).
108**/
109SHELL_STATUS
110EFIAPI
111ShellCommandRunIf (
112 IN EFI_HANDLE ImageHandle,
113 IN EFI_SYSTEM_TABLE *SystemTable
114 );
115
116/**
117 Function for 'goto' command.
118
119 @param[in] ImageHandle Handle to the Image (NULL if Internal).
120 @param[in] SystemTable Pointer to the System Table (NULL if Internal).
121**/
122SHELL_STATUS
123EFIAPI
124ShellCommandRunGoto (
125 IN EFI_HANDLE ImageHandle,
126 IN EFI_SYSTEM_TABLE *SystemTable
127 );
128
129/**
130 Function for 'shift' command.
131
132 @param[in] ImageHandle Handle to the Image (NULL if Internal).
133 @param[in] SystemTable Pointer to the System Table (NULL if Internal).
134**/
135SHELL_STATUS
136EFIAPI
137ShellCommandRunShift (
138 IN EFI_HANDLE ImageHandle,
139 IN EFI_SYSTEM_TABLE *SystemTable
140 );
141
142/**
143 Function for 'else' command.
144
145 @param[in] ImageHandle Handle to the Image (NULL if Internal).
146 @param[in] SystemTable Pointer to the System Table (NULL if Internal).
147**/
148SHELL_STATUS
149EFIAPI
150ShellCommandRunElse (
151 IN EFI_HANDLE ImageHandle,
152 IN EFI_SYSTEM_TABLE *SystemTable
153 );
154
155///
156/// Function prototype for BOTH GetNextNode and GetPreviousNode...
157/// This is used to control the MoveToTag function direction...
158///
159typedef
160LIST_ENTRY *
161(EFIAPI *LIST_MANIP_FUNC)(
162 IN CONST LIST_ENTRY *List,
163 IN CONST LIST_ENTRY *Node
164 );
165
166/**
167 Move the script pointer from 1 tag (line) to another.
168
169 It functions so that count starts at 1 and it increases or decreases when it
170 hits the specified tags. when it hits zero the location has been found.
171
172 DecrementerTag and IncrementerTag are used to get around for/endfor and
173 similar paired types where the entire middle should be ignored.
174
175 If label is used it will be used instead of the count.
176
177 @param[in] Function The function to use to enumerate through the
178 list. Normally GetNextNode or GetPreviousNode.
179 @param[in] DecrementerTag The tag to decrement the count at.
180 @param[in] IncrementerTag The tag to increment the count at.
181 @param[in] Label A label to look for.
182 @param[in, out] ScriptFile The pointer to the current script file structure.
183 @param[in] MovePast TRUE makes function return 1 past the found
184 location.
185 @param[in] FindOnly TRUE to not change the ScriptFile.
186 @param[in] WrapAroundScript TRUE to wrap end-to-beginning or vise versa in
187 searching.
188**/
189BOOLEAN
190MoveToTag (
191 IN CONST LIST_MANIP_FUNC Function,
192 IN CONST CHAR16 *DecrementerTag,
193 IN CONST CHAR16 *IncrementerTag,
194 IN CONST CHAR16 *Label OPTIONAL,
195 IN OUT SCRIPT_FILE *ScriptFile,
196 IN CONST BOOLEAN MovePast,
197 IN CONST BOOLEAN FindOnly,
198 IN CONST BOOLEAN WrapAroundScript
199 );
200
201#endif
Note: See TracBrowser for help on using the repository browser.

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette