]> git.proxmox.com Git - mirror_edk2.git/blame - ShellPkg/Include/Library/ShellCommandLib.h
ARM Packages: Fixed missing braces (the warning was disabled by GCC)
[mirror_edk2.git] / ShellPkg / Include / Library / ShellCommandLib.h
CommitLineData
a405b86d 1/** @file\r
2 Provides interface to shell internal functions for shell commands.\r
3\r
4 This library is for use ONLY by shell commands linked into the shell application.\r
5 This library will not funciton if it is used for UEFI Shell 2.0 Applications.\r
6\r
863986b3 7 Copyright (c) 2009 - 2013, Intel Corporation. All rights reserved.<BR>\r
a405b86d 8 This program and the accompanying materials\r
9 are licensed and made available under the terms and conditions of the BSD License\r
10 which accompanies this distribution. The full text of the license may be found at\r
11 http://opensource.org/licenses/bsd-license.php.\r
12\r
13 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
14 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
15\r
16**/\r
17\r
18#ifndef _SHELL_COMMAND_LIB_\r
19#define _SHELL_COMMAND_LIB_\r
20\r
21#include <Uefi.h>\r
22#include <ShellBase.h>\r
23\r
24#include <Protocol/EfiShell.h>\r
25#include <Protocol/EfiShellParameters.h>\r
26#include <Protocol/UnicodeCollation.h>\r
a405b86d 27#include <Protocol/SimpleFileSystem.h>\r
28\r
29#include <Library/UefiBootServicesTableLib.h>\r
30\r
31//\r
32// The extern global protocol poionters.\r
33//\r
a405b86d 34extern EFI_UNICODE_COLLATION_PROTOCOL *gUnicodeCollation;\r
a405b86d 35extern CONST CHAR16* SupportLevel[];\r
36\r
37//\r
38// The map list objects.\r
39//\r
40typedef struct {\r
41 LIST_ENTRY Link;\r
42 EFI_DEVICE_PATH_PROTOCOL *DevicePath;\r
43 CHAR16 *MapName;\r
44 CHAR16 *CurrentDirectoryPath;\r
45 UINT64 Flags;\r
46} SHELL_MAP_LIST;\r
47/// List of Mappings - DeviceName and Drive Letter(ism).\r
48extern SHELL_MAP_LIST gShellMapList;\r
49/// Pointer to node of current directory in the mMapList.\r
50extern SHELL_MAP_LIST *gShellCurDir;\r
51\r
52/**\r
53 Returns the help MAN fileName for a given shell command.\r
54\r
55 @retval !NULL The unicode string of the MAN filename.\r
56 @retval NULL An error ocurred.\r
57\r
58**/\r
59typedef\r
60CONST CHAR16 *\r
61(EFIAPI *SHELL_GET_MAN_FILENAME)(\r
62 VOID\r
63 );\r
64\r
65/**\r
66 Runs a shell command on a given command line.\r
67\r
68 The specific operation of a given shell command is specified in the UEFI Shell\r
69 Specification 2.0, or in the source of the given command.\r
70\r
71 Upon completion of the command run the shell protocol and environment variables\r
72 may have been updated due to the operation.\r
73\r
74 @param[in] ImageHandle The ImageHandle to the app, or NULL if\r
75 the command built into shell.\r
76 @param[in] SystemTable The pointer to the system table.\r
77\r
78 @retval RETURN_SUCCESS The shell command was sucessful.\r
79 @retval RETURN_UNSUPPORTED The command is not supported.\r
80**/\r
81typedef\r
82SHELL_STATUS\r
83(EFIAPI *SHELL_RUN_COMMAND)(\r
84 IN EFI_HANDLE ImageHandle,\r
85 IN EFI_SYSTEM_TABLE *SystemTable\r
86 );\r
87\r
88/**\r
89 Registers the handlers of type SHELL_RUN_COMMAND and\r
90 SHELL_GET_MAN_FILENAME for each shell command.\r
91\r
92 If the ShellSupportLevel is greater than the value of\r
93 PcdShellSupportLevel, then return RETURN_UNSUPPORTED.\r
94\r
95 Registers the the handlers specified by GetHelpInfoHandler and CommandHandler\r
96 with the command specified by CommandString. If the command named by\r
97 CommandString has already been registered, then return\r
98 RETURN_ALREADY_STARTED.\r
99\r
100 If there are not enough resources available to register the handlers, then\r
101 RETURN_OUT_OF_RESOURCES is returned.\r
102\r
103 If CommandString is NULL, then ASSERT().\r
104 If GetHelpInfoHandler is NULL, then ASSERT().\r
105 If CommandHandler is NULL, then ASSERT().\r
106 If ProfileName is NULL, then ASSERT().\r
107\r
108 @param[in] CommandString The pointer to the command name. This is the\r
109 name to look for on the command line in\r
110 the shell.\r
111 @param[in] CommandHandler The pointer to a function that runs the\r
112 specified command.\r
113 @param[in] GetManFileName The pointer to a function that provides man\r
114 filename.\r
115 @param[in] ShellMinSupportLevel The minimum Shell Support Level which has this\r
116 function.\r
117 @param[in] ProfileName The profile name to require for support of this\r
118 function.\r
119 @param[in] CanAffectLE Indicates whether this command's return value\r
120 can change the LASTERROR environment variable.\r
121 @param[in] HiiHandle The handle of this command's HII entry.\r
122 @param[in] ManFormatHelp The HII locator for the help text.\r
123\r
124 @retval RETURN_SUCCESS The handlers were registered.\r
125 @retval RETURN_OUT_OF_RESOURCES There are not enough resources available to\r
126 register the shell command.\r
127 @retval RETURN_UNSUPPORTED The ShellMinSupportLevel was higher than the\r
128 currently allowed support level.\r
129 @retval RETURN_ALREADY_STARTED The CommandString represents a command that\r
130 is already registered. Only one handler set for\r
131 a given command is allowed.\r
132 @sa SHELL_GET_MAN_FILENAME\r
133 @sa SHELL_RUN_COMMAND\r
134**/\r
135RETURN_STATUS\r
136EFIAPI\r
137ShellCommandRegisterCommandName (\r
138 IN CONST CHAR16 *CommandString,\r
139 IN SHELL_RUN_COMMAND CommandHandler,\r
140 IN SHELL_GET_MAN_FILENAME GetManFileName,\r
141 IN UINT32 ShellMinSupportLevel,\r
142 IN CONST CHAR16 *ProfileName,\r
143 IN CONST BOOLEAN CanAffectLE,\r
144 IN CONST EFI_HANDLE HiiHandle,\r
145 IN CONST EFI_STRING_ID ManFormatHelp\r
146 );\r
147\r
148/**\r
149 Checks if a command string has been registered for CommandString, and if so, it runs\r
150 the previously registered handler for that command with the command line.\r
151\r
152 If CommandString is NULL, then ASSERT().\r
153\r
154 If Sections is specified, then each section name listed will be compared in a case sensitive\r
155 manner to the section names described in Appendix B UEFI Shell 2.0 Specification. If the section exists,\r
156 it is appended to the returned help text. If the section does not exist, no\r
157 information is returned. If Sections is NULL, then all help text information\r
158 available is returned.\r
159\r
4ff7e37b
ED
160 @param[in] CommandString The pointer to the command name. This is the name\r
161 found on the command line in the shell.\r
162 @param[in, out] RetVal The pointer to the return value from the command handler.\r
a405b86d 163\r
4ff7e37b
ED
164 @param[in, out] CanAffectLE Indicates whether this command's return value\r
165 needs to be placed into LASTERROR environment variable.\r
a405b86d 166\r
167 @retval RETURN_SUCCESS The handler was run.\r
168 @retval RETURN_NOT_FOUND The CommandString did not match a registered\r
169 command name.\r
170 @sa SHELL_RUN_COMMAND\r
171**/\r
172RETURN_STATUS\r
173EFIAPI\r
174ShellCommandRunCommandHandler (\r
175 IN CONST CHAR16 *CommandString,\r
176 IN OUT SHELL_STATUS *RetVal,\r
177 IN OUT BOOLEAN *CanAffectLE OPTIONAL\r
178 );\r
179\r
180/**\r
181 Checks if a command string has been registered for CommandString, and if so, it\r
182 returns the MAN filename specified for that command.\r
183\r
184 If CommandString is NULL, then ASSERT().\r
185\r
186 @param[in] CommandString The pointer to the command name. This is the name\r
187 found on the command line in the shell.\r
188\r
189 @retval NULL The CommandString was not a registered command.\r
190 @retval other The name of the MAN file.\r
191 @sa SHELL_GET_MAN_FILENAME\r
192**/\r
193CONST CHAR16*\r
194EFIAPI\r
195ShellCommandGetManFileNameHandler (\r
196 IN CONST CHAR16 *CommandString\r
197 );\r
198\r
199\r
200typedef struct {\r
201 LIST_ENTRY Link;\r
202 CHAR16 *CommandString;\r
203} COMMAND_LIST;\r
204\r
205/**\r
206 Get the list of all available shell internal commands. This is a linked list,\r
207 via the LIST_ENTRY structure. Enumerate through it using the BaseLib linked\r
208 list functions. Do not modify the values.\r
209\r
4bbdc0e1 210 @param[in] Sort TRUE to alphabetically sort the values first. FALSE otherwise.\r
211\r
a405b86d 212 @return A linked list of all available shell commands.\r
213**/\r
214CONST COMMAND_LIST*\r
215EFIAPI\r
216ShellCommandGetCommandList (\r
4bbdc0e1 217 IN CONST BOOLEAN Sort\r
a405b86d 218 );\r
219\r
220typedef struct {\r
221 LIST_ENTRY Link;\r
222 CHAR16 *CommandString;\r
223 CHAR16 *Alias;\r
224} ALIAS_LIST;\r
225\r
226/**\r
227 Registers aliases to be set as part of the initialization of the shell application.\r
228\r
229 If Command is NULL, then ASSERT().\r
230 If Alias is NULL, then ASSERT().\r
231\r
232 @param[in] Command The pointer to the Command.\r
233 @param[in] Alias The pointer to Alias.\r
234\r
235 @retval RETURN_SUCCESS The handlers were registered.\r
236 @retval RETURN_OUT_OF_RESOURCES There are not enough resources available to\r
237 register the shell command.\r
238**/\r
239RETURN_STATUS\r
240EFIAPI\r
241ShellCommandRegisterAlias (\r
242 IN CONST CHAR16 *Command,\r
243 IN CONST CHAR16 *Alias\r
244 );\r
245\r
246/**\r
247 Get the list of all shell alias commands. This is a linked list,\r
248 via LIST_ENTRY structure. Enumerate through it using the BaseLib linked\r
249 list functions. Do not modify the values.\r
250\r
251 @return A linked list of all requested shell aliases.\r
252**/\r
253CONST ALIAS_LIST*\r
254EFIAPI\r
255ShellCommandGetInitAliasList (\r
256 VOID\r
257 );\r
258\r
259/**\r
260 Determine if a given alias is on the list of built in aliases.\r
261\r
262 @param[in] Alias The alias to test for.\r
263\r
264 @retval TRUE The alias is a built in alias.\r
265 @retval FALSE The alias is not a built in alias.\r
266**/\r
267BOOLEAN\r
268EFIAPI\r
269ShellCommandIsOnAliasList (\r
270 IN CONST CHAR16 *Alias\r
271 );\r
272\r
273/**\r
274 Checks if a command is already on the list.\r
275\r
276 @param[in] CommandString The command string to check for on the list.\r
277\r
278 @retval TRUE CommandString represents a registered command.\r
279 @retval FALSE CommandString does not represent a registered command.\r
280**/\r
281BOOLEAN\r
282EFIAPI\r
283ShellCommandIsCommandOnList (\r
284 IN CONST CHAR16 *CommandString\r
285 );\r
286\r
287/**\r
288 Get the help text for a command.\r
289\r
290 @param[in] CommandString The command name.\r
291\r
292 @retval NULL No help text was found.\r
293 @return The string of the help text. The caller required to free.\r
294**/\r
295CHAR16*\r
296EFIAPI\r
297ShellCommandGetCommandHelp (\r
298 IN CONST CHAR16 *CommandString\r
299 );\r
300\r
301/**\r
302 Function to make sure that the above pointers are valid.\r
303**/\r
304EFI_STATUS\r
305EFIAPI\r
306CommandInit (\r
307 VOID\r
308 );\r
309\r
310/**\r
311 Function to determine current state of ECHO. Echo determines if lines from scripts\r
312 and ECHO commands are enabled.\r
313\r
314 @retval TRUE Echo is currently enabled.\r
315 @retval FALSE Echo is currently disabled.\r
316**/\r
317BOOLEAN\r
318EFIAPI\r
319ShellCommandGetEchoState (\r
320 VOID\r
321 );\r
322\r
323/**\r
324 Function to set current state of ECHO. Echo determines if lines from scripts\r
325 and ECHO commands are enabled.\r
326\r
327 @param[in] State TRUE to enable Echo, FALSE otherwise.\r
328**/\r
329VOID\r
330EFIAPI\r
331ShellCommandSetEchoState (\r
332 IN BOOLEAN State\r
333 );\r
334\r
335\r
336\r
337/**\r
338 Indicate that the current shell or script should exit.\r
339\r
340 @param[in] ScriptOnly TRUE if exiting a script; FALSE otherwise.\r
b6b22b13 341 @param[in] ErrorCode The 64 bit error code to return.\r
a405b86d 342**/\r
343VOID\r
344EFIAPI\r
345ShellCommandRegisterExit (\r
b6b22b13 346 IN BOOLEAN ScriptOnly,\r
347 IN CONST UINT64 ErrorCode\r
348 );\r
349\r
350/**\r
351 Retrieve the Exit code.\r
352\r
353 @return the value passed into RegisterExit.\r
354**/\r
355UINT64\r
356EFIAPI\r
357ShellCommandGetExitCode (\r
358 VOID\r
a405b86d 359 );\r
360\r
361/**\r
362 Retrieve the Exit indicator.\r
363\r
364 @retval TRUE Exit was indicated.\r
365 @retval FALSE Exit was not indicated.\r
366**/\r
367BOOLEAN\r
368EFIAPI\r
369ShellCommandGetExit (\r
370 VOID\r
371 );\r
372\r
373/**\r
374 Retrieve the Exit script indicator.\r
375\r
376 If ShellCommandGetExit returns FALSE, then the return from this is undefined.\r
377\r
378 @retval TRUE ScriptOnly was indicated.\r
379 @retval FALSE ScriptOnly was not indicated.\r
380**/\r
381BOOLEAN\r
382EFIAPI\r
383ShellCommandGetScriptExit (\r
384 VOID\r
385 );\r
386\r
387typedef struct {\r
388 LIST_ENTRY Link; ///< List enumerator items.\r
389 UINTN Line; ///< What line of the script file this was on.\r
390 CHAR16 *Cl; ///< The original command line.\r
391 VOID *Data; ///< The data structure format dependant upon Command. (not always used)\r
392 BOOLEAN Reset; ///< Reset the command (it must be treated like a initial run (but it may have data already))\r
393} SCRIPT_COMMAND_LIST;\r
394\r
395typedef struct {\r
396 CHAR16 *ScriptName; ///< The filename of this script.\r
397 CHAR16 **Argv; ///< The parmameters to the script file.\r
398 UINTN Argc; ///< The count of parameters.\r
399 LIST_ENTRY CommandList; ///< The script converted to a list of commands (SCRIPT_COMMAND_LIST objects).\r
400 SCRIPT_COMMAND_LIST *CurrentCommand; ///< The command currently being operated. If !=NULL must be a member of CommandList.\r
401 LIST_ENTRY SubstList; ///< A list of current script loop alias' (ALIAS_LIST objects) (Used for the for %-based replacement).\r
402} SCRIPT_FILE;\r
403\r
404/**\r
405 Function to return a pointer to the currently running script file object.\r
406\r
407 @retval NULL A script file is not currently running.\r
408 @return A pointer to the current script file object.\r
409**/\r
410SCRIPT_FILE*\r
411EFIAPI\r
412ShellCommandGetCurrentScriptFile (\r
413 VOID\r
414 );\r
415\r
416/**\r
417 Function to set a new script as the currently running one.\r
418\r
419 This function will correctly stack and unstack nested scripts.\r
420\r
421 @param[in] Script The pointer to new script information structure. If NULL,\r
422 it removes and de-allocates the topmost Script structure.\r
423\r
424 @return A pointer to the current running script file after this\r
425 change. It is NULL if removing the final script.\r
426**/\r
427SCRIPT_FILE*\r
428EFIAPI\r
429ShellCommandSetNewScript (\r
430 IN SCRIPT_FILE *Script OPTIONAL\r
431 );\r
432\r
0ab85bef 433/**\r
434 Function to cleanup all memory from a SCRIPT_FILE structure.\r
435\r
436 @param[in] Script The pointer to the structure to cleanup.\r
437**/\r
438VOID\r
439EFIAPI\r
440DeleteScriptFileStruct (\r
441 IN SCRIPT_FILE *Script\r
442 );\r
443\r
a405b86d 444/**\r
445 Function to get the current Profile string.\r
446\r
447 This is used to retrieve what profiles were installed.\r
448\r
449 @retval NULL There are no installed profiles.\r
450 @return A semicolon-delimited list of profiles.\r
451**/\r
452CONST CHAR16 *\r
453EFIAPI\r
454ShellCommandGetProfileList (\r
455 VOID\r
456 );\r
457\r
458typedef enum {\r
459 MappingTypeFileSystem,\r
460 MappingTypeBlockIo,\r
461 MappingTypeMax\r
462} SHELL_MAPPING_TYPE;\r
463\r
464/**\r
465 Function to generate the next default mapping name.\r
466\r
467 If the return value is not NULL then it must be callee freed.\r
468\r
469 @param Type What kind of mapping name to make.\r
470\r
471 @retval NULL a memory allocation failed.\r
472 @return a new map name string\r
473**/\r
474CHAR16*\r
475EFIAPI\r
476ShellCommandCreateNewMappingName(\r
477 IN CONST SHELL_MAPPING_TYPE Type\r
478 );\r
479\r
480/**\r
481 Function to initialize the table for creating consistent map names.\r
482\r
483 @param[out] Table The pointer to pointer to pointer to DevicePathProtocol object.\r
484\r
485 @retval EFI_SUCCESS The table was created successfully.\r
486**/\r
487EFI_STATUS\r
488EFIAPI\r
489ShellCommandConsistMappingInitialize (\r
490 EFI_DEVICE_PATH_PROTOCOL ***Table\r
491 );\r
492\r
493/**\r
494 Function to uninitialize the table for creating consistent map names.\r
495\r
496 The parameter must have been received from ShellCommandConsistMappingInitialize.\r
497\r
498 @param[out] Table The pointer to pointer to DevicePathProtocol object.\r
499\r
500 @retval EFI_SUCCESS The table was deleted successfully.\r
501**/\r
502EFI_STATUS\r
503EFIAPI\r
504ShellCommandConsistMappingUnInitialize (\r
505 EFI_DEVICE_PATH_PROTOCOL **Table\r
506 );\r
507\r
508/**\r
509 Create a consistent mapped name for the device specified by DevicePath \r
510 based on the Table.\r
511\r
512 This must be called after ShellCommandConsistMappingInitialize() and \r
513 before ShellCommandConsistMappingUnInitialize() is called.\r
514\r
4bbdc0e1 515 @param[in] DevicePath The pointer to the dev path for the device.\r
a405b86d 516 @param[in] Table The Table of mapping information.\r
517\r
518 @retval NULL A consistent mapped name could not be created.\r
519 @return A pointer to a string allocated from pool with the device name.\r
520**/\r
521CHAR16*\r
522EFIAPI\r
523ShellCommandConsistMappingGenMappingName (\r
524 IN EFI_DEVICE_PATH_PROTOCOL *DevicePath,\r
525 IN EFI_DEVICE_PATH_PROTOCOL **Table\r
526 );\r
527\r
528/**\r
529 Function to search the list of mappings for the first matching node on the\r
530 list based on the MapKey.\r
531\r
532 @param[in] MapKey The pointer to the string key to search for in the map.\r
533\r
534 @return the node on the list.\r
535**/\r
536SHELL_MAP_LIST*\r
537EFIAPI\r
538ShellCommandFindMapItem (\r
539 IN CONST CHAR16 *MapKey\r
540 );\r
541\r
542/**\r
543 Function to add a map node to the list of map items and update the "path" environment variable (optionally).\r
544\r
545 If Path is TRUE (during initialization only), the path environment variable will also be updated to include\r
546 default paths on the new map name...\r
547\r
548 Path should be FALSE when this function is called from the protocol SetMap function.\r
549\r
550 @param[in] Name The human readable mapped name.\r
551 @param[in] DevicePath The Device Path for this map.\r
552 @param[in] Flags The Flags attribute for this map item.\r
553 @param[in] Path TRUE to update path, FALSE to skip this step (should only be TRUE during initialization).\r
554\r
555 @retval EFI_SUCCESS The addition was sucessful.\r
556 @retval EFI_OUT_OF_RESOURCES A memory allocation failed.\r
557 @retval EFI_INVALID_PARAMETER A parameter was invalid.\r
558**/\r
559EFI_STATUS\r
560EFIAPI\r
561ShellCommandAddMapItemAndUpdatePath(\r
562 IN CONST CHAR16 *Name,\r
563 IN CONST EFI_DEVICE_PATH_PROTOCOL *DevicePath,\r
564 IN CONST UINT64 Flags,\r
565 IN CONST BOOLEAN Path\r
566 );\r
567\r
568/**\r
569 Creates the default map names for each device path in the system with\r
570 a protocol depending on the Type.\r
571\r
572 Also sets up the default path environment variable if Type is FileSystem.\r
573\r
574 @retval EFI_SUCCESS All map names were created sucessfully.\r
575 @retval EFI_NOT_FOUND No protocols were found in the system.\r
576 @return Error returned from gBS->LocateHandle().\r
577\r
578 @sa LocateHandle\r
579**/\r
580EFI_STATUS\r
581EFIAPI\r
582ShellCommandCreateInitialMappingsAndPaths(\r
583 VOID\r
584 );\r
585\r
a405b86d 586/**\r
587 Converts a SHELL_FILE_HANDLE to an EFI_FILE_PROTOCOL*.\r
588\r
589 @param[in] Handle The SHELL_FILE_HANDLE to convert.\r
590\r
591 @return a EFI_FILE_PROTOCOL* representing the same file.\r
592**/\r
593EFI_FILE_PROTOCOL*\r
594EFIAPI\r
595ConvertShellHandleToEfiFileProtocol(\r
596 IN CONST SHELL_FILE_HANDLE Handle\r
597 );\r
598\r
599/**\r
600 Remove a SHELL_FILE_HANDLE frmo the list of SHELL_FILE_HANDLES.\r
601\r
602 @param[in] Handle The SHELL_FILE_HANDLE to remove.\r
603\r
604 @retval TRUE The item was removed.\r
605 @retval FALSE The item was not found.\r
606**/\r
607BOOLEAN\r
608EFIAPI\r
609ShellFileHandleRemove(\r
610 IN CONST SHELL_FILE_HANDLE Handle\r
611 );\r
612\r
613/**\r
614 Converts a EFI_FILE_PROTOCOL* to an SHELL_FILE_HANDLE.\r
615\r
616 @param[in] Handle The pointer to EFI_FILE_PROTOCOL to convert.\r
617 @param[in] Path The path to the file for verification.\r
618\r
619 @return a SHELL_FILE_HANDLE representing the same file.\r
620**/\r
621SHELL_FILE_HANDLE\r
622EFIAPI\r
623ConvertEfiFileProtocolToShellHandle(\r
624 IN CONST EFI_FILE_PROTOCOL *Handle,\r
625 IN CONST CHAR16 *Path\r
626 );\r
627\r
628/**\r
629 Find the path that was logged with the specified SHELL_FILE_HANDLE.\r
630\r
631 @param[in] Handle The SHELL_FILE_HANDLE to query on.\r
632\r
633 @return A pointer to the path for the file.\r
634**/\r
635CONST CHAR16*\r
636EFIAPI\r
637ShellFileHandleGetPath(\r
638 IN CONST SHELL_FILE_HANDLE Handle\r
639 );\r
640\r
641\r
642/**\r
643 Function to determine if a SHELL_FILE_HANDLE is at the end of the file.\r
644\r
645 This will NOT work on directories.\r
646\r
647 If Handle is NULL, then ASSERT.\r
648\r
649 @param[in] Handle the file handle\r
650\r
651 @retval TRUE the position is at the end of the file\r
652 @retval FALSE the position is not at the end of the file\r
653**/\r
654BOOLEAN\r
655EFIAPI\r
656ShellFileHandleEof(\r
657 IN SHELL_FILE_HANDLE Handle\r
658 );\r
659\r
a405b86d 660typedef struct {\r
661 LIST_ENTRY Link;\r
662 void *Buffer;\r
663} BUFFER_LIST;\r
664\r
665/**\r
666 Frees any BUFFER_LIST defined type.\r
667\r
668 @param[in] List The pointer to the list head.\r
669**/\r
670VOID\r
671EFIAPI\r
672FreeBufferList (\r
673 IN BUFFER_LIST *List\r
674 );\r
675\r
a405b86d 676#endif //_SHELL_COMMAND_LIB_\r