]>
Commit | Line | Data |
---|---|---|
a405b86d | 1 | /** @file\r |
2 | Main file for NULL named library for level 1 shell command functions.\r | |
3 | \r | |
77dcec12 | 4 | Copyright (c) 2009 - 2011, Intel Corporation. All rights reserved.<BR>\r |
a405b86d | 5 | This program and the accompanying materials\r |
6 | are licensed and made available under the terms and conditions of the BSD License\r | |
7 | which accompanies this distribution. The full text of the license may be found at\r | |
8 | http://opensource.org/licenses/bsd-license.php\r | |
9 | \r | |
10 | THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r | |
11 | WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r | |
12 | \r | |
13 | **/\r | |
14 | \r | |
a1d4bfcc | 15 | #ifndef _UEFI_SHELL_LEVEL1_COMMANDS_LIB_H_\r |
77dcec12 | 16 | #define _UEFI_SHELL_LEVEL1_COMMANDS_LIB_H_\r |
17 | \r | |
a405b86d | 18 | #include <Uefi.h>\r |
19 | #include <ShellBase.h>\r | |
20 | \r | |
bca163ff LG |
21 | #include <Guid/ShellLibHiiGuid.h>\r |
22 | \r | |
a405b86d | 23 | #include <Protocol/EfiShell.h>\r |
24 | #include <Protocol/EfiShellParameters.h>\r | |
25 | #include <Protocol/DevicePath.h>\r | |
26 | #include <Protocol/LoadedImage.h>\r | |
27 | #include <Protocol/UnicodeCollation.h>\r | |
28 | #include <Protocol/DevicePathToText.h>\r | |
29 | \r | |
30 | #include <Library/BaseLib.h>\r | |
31 | #include <Library/BaseMemoryLib.h>\r | |
32 | #include <Library/DebugLib.h>\r | |
33 | #include <Library/MemoryAllocationLib.h>\r | |
34 | #include <Library/PcdLib.h>\r | |
35 | #include <Library/ShellCommandLib.h>\r | |
36 | #include <Library/ShellLib.h>\r | |
37 | #include <Library/SortLib.h>\r | |
38 | #include <Library/UefiLib.h>\r | |
39 | #include <Library/UefiRuntimeServicesTableLib.h>\r | |
40 | #include <Library/UefiBootServicesTableLib.h>\r | |
41 | #include <Library/HiiLib.h>\r | |
42 | #include <Library/FileHandleLib.h>\r | |
43 | \r | |
44 | extern EFI_HANDLE gShellLevel1HiiHandle;\r | |
a405b86d | 45 | \r |
77dcec12 | 46 | /**\r |
47 | Function for 'stall' command.\r | |
48 | \r | |
49 | @param[in] ImageHandle Handle to the Image (NULL if Internal).\r | |
50 | @param[in] SystemTable Pointer to the System Table (NULL if Internal).\r | |
51 | **/\r | |
52 | SHELL_STATUS\r | |
53 | EFIAPI\r | |
54 | ShellCommandRunStall (\r | |
55 | IN EFI_HANDLE ImageHandle,\r | |
56 | IN EFI_SYSTEM_TABLE *SystemTable\r | |
57 | );\r | |
58 | \r | |
a405b86d | 59 | /**\r |
60 | Function for 'exit' command.\r | |
61 | \r | |
62 | @param[in] ImageHandle Handle to the Image (NULL if Internal).\r | |
63 | @param[in] SystemTable Pointer to the System Table (NULL if Internal).\r | |
64 | **/\r | |
65 | SHELL_STATUS\r | |
66 | EFIAPI\r | |
67 | ShellCommandRunExit (\r | |
68 | IN EFI_HANDLE ImageHandle,\r | |
69 | IN EFI_SYSTEM_TABLE *SystemTable\r | |
70 | );\r | |
71 | \r | |
72 | /**\r | |
73 | Function for 'endif' command.\r | |
74 | \r | |
75 | @param[in] ImageHandle Handle to the Image (NULL if Internal).\r | |
76 | @param[in] SystemTable Pointer to the System Table (NULL if Internal).\r | |
77 | **/\r | |
78 | SHELL_STATUS\r | |
79 | EFIAPI\r | |
80 | ShellCommandRunEndIf (\r | |
81 | IN EFI_HANDLE ImageHandle,\r | |
82 | IN EFI_SYSTEM_TABLE *SystemTable\r | |
83 | );\r | |
84 | \r | |
85 | /**\r | |
86 | Function for 'for' command.\r | |
87 | \r | |
88 | @param[in] ImageHandle Handle to the Image (NULL if Internal).\r | |
89 | @param[in] SystemTable Pointer to the System Table (NULL if Internal).\r | |
90 | **/\r | |
91 | SHELL_STATUS\r | |
92 | EFIAPI\r | |
93 | ShellCommandRunFor (\r | |
94 | IN EFI_HANDLE ImageHandle,\r | |
95 | IN EFI_SYSTEM_TABLE *SystemTable\r | |
96 | );\r | |
97 | \r | |
98 | /**\r | |
99 | Function for 'endfor' command.\r | |
100 | \r | |
101 | @param[in] ImageHandle Handle to the Image (NULL if Internal).\r | |
102 | @param[in] SystemTable Pointer to the System Table (NULL if Internal).\r | |
103 | **/\r | |
104 | SHELL_STATUS\r | |
105 | EFIAPI\r | |
106 | ShellCommandRunEndFor (\r | |
107 | IN EFI_HANDLE ImageHandle,\r | |
108 | IN EFI_SYSTEM_TABLE *SystemTable\r | |
109 | );\r | |
110 | \r | |
111 | /**\r | |
112 | Function for 'if' command.\r | |
113 | \r | |
114 | @param[in] ImageHandle Handle to the Image (NULL if Internal).\r | |
115 | @param[in] SystemTable Pointer to the System Table (NULL if Internal).\r | |
116 | **/\r | |
117 | SHELL_STATUS\r | |
118 | EFIAPI\r | |
119 | ShellCommandRunIf (\r | |
120 | IN EFI_HANDLE ImageHandle,\r | |
121 | IN EFI_SYSTEM_TABLE *SystemTable\r | |
122 | );\r | |
123 | \r | |
124 | /**\r | |
125 | Function for 'goto' command.\r | |
126 | \r | |
127 | @param[in] ImageHandle Handle to the Image (NULL if Internal).\r | |
128 | @param[in] SystemTable Pointer to the System Table (NULL if Internal).\r | |
129 | **/\r | |
130 | SHELL_STATUS\r | |
131 | EFIAPI\r | |
132 | ShellCommandRunGoto (\r | |
133 | IN EFI_HANDLE ImageHandle,\r | |
134 | IN EFI_SYSTEM_TABLE *SystemTable\r | |
135 | );\r | |
136 | \r | |
137 | /**\r | |
138 | Function for 'shift' command.\r | |
139 | \r | |
140 | @param[in] ImageHandle Handle to the Image (NULL if Internal).\r | |
141 | @param[in] SystemTable Pointer to the System Table (NULL if Internal).\r | |
142 | **/\r | |
143 | SHELL_STATUS\r | |
144 | EFIAPI\r | |
145 | ShellCommandRunShift (\r | |
146 | IN EFI_HANDLE ImageHandle,\r | |
147 | IN EFI_SYSTEM_TABLE *SystemTable\r | |
148 | );\r | |
149 | \r | |
150 | \r | |
151 | /**\r | |
152 | Function for 'else' command.\r | |
153 | \r | |
154 | @param[in] ImageHandle Handle to the Image (NULL if Internal).\r | |
155 | @param[in] SystemTable Pointer to the System Table (NULL if Internal).\r | |
156 | **/\r | |
157 | SHELL_STATUS\r | |
158 | EFIAPI\r | |
159 | ShellCommandRunElse (\r | |
160 | IN EFI_HANDLE ImageHandle,\r | |
161 | IN EFI_SYSTEM_TABLE *SystemTable\r | |
162 | );\r | |
163 | \r | |
164 | ///\r | |
165 | /// Function prototype for BOTH GetNextNode and GetPreviousNode...\r | |
166 | /// This is used to control the MoveToTag function direction...\r | |
167 | ///\r | |
168 | typedef\r | |
169 | LIST_ENTRY *\r | |
170 | (EFIAPI *LIST_MANIP_FUNC)(\r | |
171 | IN CONST LIST_ENTRY *List,\r | |
172 | IN CONST LIST_ENTRY *Node\r | |
173 | );\r | |
174 | \r | |
175 | /**\r | |
77dcec12 | 176 | Move the script pointer from 1 tag (line) to another.\r |
177 | \r | |
178 | It functions so that count starts at 1 and it increases or decreases when it\r | |
179 | hits the specified tags. when it hits zero the location has been found.\r | |
180 | \r | |
181 | DecrementerTag and IncrementerTag are used to get around for/endfor and \r | |
182 | similar paired types where the entire middle should be ignored.\r | |
183 | \r | |
184 | If label is used it will be used instead of the count.\r | |
185 | \r | |
4ff7e37b ED |
186 | @param[in] Function The function to use to enumerate through the \r |
187 | list. Normally GetNextNode or GetPreviousNode.\r | |
188 | @param[in] DecrementerTag The tag to decrement the count at.\r | |
189 | @param[in] IncrementerTag The tag to increment the count at.\r | |
190 | @param[in] Label A label to look for.\r | |
191 | @param[in, out] ScriptFile The pointer to the current script file structure.\r | |
192 | @param[in] MovePast TRUE makes function return 1 past the found \r | |
193 | location.\r | |
194 | @param[in] FindOnly TRUE to not change the ScriptFile.\r | |
195 | @param[in] WrapAroundScript TRUE to wrap end-to-begining or vise versa in \r | |
196 | searching.\r | |
a405b86d | 197 | **/\r |
198 | BOOLEAN\r | |
199 | EFIAPI\r | |
200 | MoveToTag (\r | |
201 | IN CONST LIST_MANIP_FUNC Function,\r | |
202 | IN CONST CHAR16 *DecrementerTag,\r | |
203 | IN CONST CHAR16 *IncrementerTag,\r | |
204 | IN CONST CHAR16 *Label OPTIONAL,\r | |
77dcec12 | 205 | IN OUT SCRIPT_FILE *ScriptFile,\r |
a405b86d | 206 | IN CONST BOOLEAN MovePast,\r |
207 | IN CONST BOOLEAN FindOnly,\r | |
208 | IN CONST BOOLEAN WrapAroundScript\r | |
209 | );\r | |
210 | \r | |
77dcec12 | 211 | #endif\r |
212 | \r |