VirtualBox

source: vbox/trunk/src/VBox/Devices/EFI/Firmware/ShellPkg/Library/UefiShellLevel2CommandsLib/UefiShellLevel2CommandsLib.h@ 48674

Last change on this file since 48674 was 48674, checked in by vboxsync, 11 years ago

EFI: Export newly imported tinaocore UEFI sources to OSE.

  • Property svn:eol-style set to native
File size: 7.7 KB
Line 
1/** @file
2 Main file for NULL named library for level 2 shell command functions.
3
4 these functions are:
5 attrib, cd, cp, date*, time*, rm, reset,
6 load, ls, map, mkdir, mv, parse, set, timezone*
7
8
9 * functions are non-interactive only
10
11
12 Copyright (c) 2009 - 2011, Intel Corporation. All rights reserved.<BR>
13 This program and the accompanying materials
14 are licensed and made available under the terms and conditions of the BSD License
15 which accompanies this distribution. The full text of the license may be found at
16 http://opensource.org/licenses/bsd-license.php
17
18 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
19 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
20
21**/
22
23#ifndef _UEFI_SHELL_LEVEL2_COMMANDS_LIB_H_
24#define _UEFI_SHELL_LEVEL2_COMMANDS_LIB_H_
25
26#include <Uefi.h>
27#include <ShellBase.h>
28
29#include <Guid/ShellLibHiiGuid.h>
30
31#include <Protocol/EfiShell.h>
32#include <Protocol/EfiShellParameters.h>
33#include <Protocol/DevicePath.h>
34#include <Protocol/LoadedImage.h>
35#include <Protocol/UnicodeCollation.h>
36#include <Protocol/DevicePathToText.h>
37
38#include <Library/BaseLib.h>
39#include <Library/BaseMemoryLib.h>
40#include <Library/DebugLib.h>
41#include <Library/MemoryAllocationLib.h>
42#include <Library/PcdLib.h>
43#include <Library/ShellCommandLib.h>
44#include <Library/ShellLib.h>
45#include <Library/UefiLib.h>
46#include <Library/UefiRuntimeServicesTableLib.h>
47#include <Library/UefiBootServicesTableLib.h>
48#include <Library/HiiLib.h>
49#include <Library/SortLib.h>
50#include <Library/FileHandleLib.h>
51#include <Library/PathLib.h>
52
53extern CONST CHAR16 mFileName[];
54extern EFI_HANDLE gShellLevel2HiiHandle;
55
56/**
57 Function for 'attrib' command.
58
59 @param[in] ImageHandle Handle to the Image (NULL if Internal).
60 @param[in] SystemTable Pointer to the System Table (NULL if Internal).
61**/
62SHELL_STATUS
63EFIAPI
64ShellCommandRunAttrib (
65 IN EFI_HANDLE ImageHandle,
66 IN EFI_SYSTEM_TABLE *SystemTable
67 );
68
69/**
70 Function for 'date' command.
71
72 @param[in] ImageHandle Handle to the Image (NULL if Internal).
73 @param[in] SystemTable Pointer to the System Table (NULL if Internal).
74**/
75SHELL_STATUS
76EFIAPI
77ShellCommandRunDate (
78 IN EFI_HANDLE ImageHandle,
79 IN EFI_SYSTEM_TABLE *SystemTable
80 );
81
82/**
83 Function for 'time' command.
84
85 @param[in] ImageHandle Handle to the Image (NULL if Internal).
86 @param[in] SystemTable Pointer to the System Table (NULL if Internal).
87**/
88SHELL_STATUS
89EFIAPI
90ShellCommandRunTime (
91 IN EFI_HANDLE ImageHandle,
92 IN EFI_SYSTEM_TABLE *SystemTable
93 );
94
95/**
96 Function for 'load' command.
97
98 @param[in] ImageHandle Handle to the Image (NULL if Internal).
99 @param[in] SystemTable Pointer to the System Table (NULL if Internal).
100**/
101SHELL_STATUS
102EFIAPI
103ShellCommandRunLoad (
104 IN EFI_HANDLE ImageHandle,
105 IN EFI_SYSTEM_TABLE *SystemTable
106 );
107
108/**
109 Function for 'ls' command.
110
111 @param[in] ImageHandle Handle to the Image (NULL if Internal).
112 @param[in] SystemTable Pointer to the System Table (NULL if Internal).
113**/
114SHELL_STATUS
115EFIAPI
116ShellCommandRunLs (
117 IN EFI_HANDLE ImageHandle,
118 IN EFI_SYSTEM_TABLE *SystemTable
119 );
120
121/**
122 Function for 'map' command.
123
124 @param[in] ImageHandle Handle to the Image (NULL if Internal).
125 @param[in] SystemTable Pointer to the System Table (NULL if Internal).
126**/
127SHELL_STATUS
128EFIAPI
129ShellCommandRunMap (
130 IN EFI_HANDLE ImageHandle,
131 IN EFI_SYSTEM_TABLE *SystemTable
132 );
133
134/**
135 Function for 'reset' command.
136
137 @param[in] ImageHandle Handle to the Image (NULL if Internal).
138 @param[in] SystemTable Pointer to the System Table (NULL if Internal).
139**/
140SHELL_STATUS
141EFIAPI
142ShellCommandRunReset (
143 IN EFI_HANDLE ImageHandle,
144 IN EFI_SYSTEM_TABLE *SystemTable
145 );
146
147/**
148 Function for 'timezone' command.
149
150 @param[in] ImageHandle Handle to the Image (NULL if Internal).
151 @param[in] SystemTable Pointer to the System Table (NULL if Internal).
152**/
153SHELL_STATUS
154EFIAPI
155ShellCommandRunTimeZone (
156 IN EFI_HANDLE ImageHandle,
157 IN EFI_SYSTEM_TABLE *SystemTable
158 );
159
160/**
161 Function for 'set' command.
162
163 @param[in] ImageHandle Handle to the Image (NULL if Internal).
164 @param[in] SystemTable Pointer to the System Table (NULL if Internal).
165**/
166SHELL_STATUS
167EFIAPI
168ShellCommandRunSet (
169 IN EFI_HANDLE ImageHandle,
170 IN EFI_SYSTEM_TABLE *SystemTable
171 );
172
173/**
174 Function for 'mkdir' command.
175
176 @param[in] ImageHandle Handle to the Image (NULL if Internal).
177 @param[in] SystemTable Pointer to the System Table (NULL if Internal).
178**/
179SHELL_STATUS
180EFIAPI
181ShellCommandRunMkDir (
182 IN EFI_HANDLE ImageHandle,
183 IN EFI_SYSTEM_TABLE *SystemTable
184 );
185
186/**
187 Function for 'cd' command.
188
189 @param[in] ImageHandle Handle to the Image (NULL if Internal).
190 @param[in] SystemTable Pointer to the System Table (NULL if Internal).
191**/
192SHELL_STATUS
193EFIAPI
194ShellCommandRunCd (
195 IN EFI_HANDLE ImageHandle,
196 IN EFI_SYSTEM_TABLE *SystemTable
197 );
198
199/**
200 Function for 'cp' command.
201
202 @param[in] ImageHandle Handle to the Image (NULL if Internal).
203 @param[in] SystemTable Pointer to the System Table (NULL if Internal).
204**/
205SHELL_STATUS
206EFIAPI
207ShellCommandRunCp (
208 IN EFI_HANDLE ImageHandle,
209 IN EFI_SYSTEM_TABLE *SystemTable
210 );
211
212/**
213 Function for 'parse' command.
214
215 @param[in] ImageHandle Handle to the Image (NULL if Internal).
216 @param[in] SystemTable Pointer to the System Table (NULL if Internal).
217**/
218SHELL_STATUS
219EFIAPI
220ShellCommandRunParse (
221 IN EFI_HANDLE ImageHandle,
222 IN EFI_SYSTEM_TABLE *SystemTable
223 );
224
225/**
226 Function for 'rm' command.
227
228 @param[in] ImageHandle Handle to the Image (NULL if Internal).
229 @param[in] SystemTable Pointer to the System Table (NULL if Internal).
230**/
231SHELL_STATUS
232EFIAPI
233ShellCommandRunRm (
234 IN EFI_HANDLE ImageHandle,
235 IN EFI_SYSTEM_TABLE *SystemTable
236 );
237
238/**
239 Function for 'mv' command.
240
241 @param[in] ImageHandle Handle to the Image (NULL if Internal).
242 @param[in] SystemTable Pointer to the System Table (NULL if Internal).
243**/
244SHELL_STATUS
245EFIAPI
246ShellCommandRunMv (
247 IN EFI_HANDLE ImageHandle,
248 IN EFI_SYSTEM_TABLE *SystemTable
249 );
250
251/**
252 returns a fully qualified directory (contains a map drive at the begining)
253 path from a unknown directory path.
254
255 If Path is already fully qualified this will return a duplicat otherwise this
256 will use get the current directory and use that to build the fully qualified
257 version.
258
259 if the return value is not NULL it must be caller freed.
260
261 @param[in] Path The unknown Path Value
262
263 @retval NULL A memory allocation failed
264 @retval NULL a fully qualified path could not be discovered.
265 @retval other pointer to a fuly qualified path.
266**/
267CHAR16*
268EFIAPI
269GetFullyQualifiedPath(
270 IN CONST CHAR16* Path
271 );
272
273/**
274 Function to verify all intermediate directories in the path.
275
276 @param[in] Path The pointer to the path to fix.
277
278 @retval EFI_SUCCESS The operation was successful.
279**/
280EFI_STATUS
281EFIAPI
282VerifyIntermediateDirectories (
283 IN CONST CHAR16 *Path
284 );
285
286/**
287 CaseInsensitive length limited string comparison.
288
289 @param[in] Source Pointer to first string.
290 @param[in] Target Pointer to second string.
291 @param[in] Count Number of characters to compare.
292
293 @retval 0 The strings are the same.
294 @return non-zero if the strings are different.
295**/
296CONST CHAR16*
297EFIAPI
298StrniCmp(
299 IN CONST CHAR16 *Source,
300 IN CONST CHAR16 *Target,
301 IN CONST UINTN Count
302 );
303
304/**
305 Function for 'Vol' command.
306
307 @param[in] ImageHandle Handle to the Image (NULL if Internal).
308 @param[in] SystemTable Pointer to the System Table (NULL if Internal).
309**/
310SHELL_STATUS
311EFIAPI
312ShellCommandRunVol (
313 IN EFI_HANDLE ImageHandle,
314 IN EFI_SYSTEM_TABLE *SystemTable
315 );
316
317#endif
318
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