]> git.proxmox.com Git - mirror_edk2.git/blob - ShellPkg/Include/Protocol/EfiShell.h
ca21899df74ff80edca72e6e02f74188f46b762d
[mirror_edk2.git] / ShellPkg / Include / Protocol / EfiShell.h
1 /** @file
2 EFI Shell protocol as defined in the UEFI Shell 2.0 specification including errata.
3
4 Copyright (c) 2006 - 2014, Intel Corporation. All rights reserved.<BR>
5 This program and the accompanying materials
6 are licensed and made available under the terms and conditions of the BSD License
7 which accompanies this distribution. The full text of the license may be found at
8 http://opensource.org/licenses/bsd-license.php
9
10 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
11 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
12
13 **/
14
15 #ifndef __EFI_SHELL_PROTOCOL__
16 #define __EFI_SHELL_PROTOCOL__
17
18 #include <ShellBase.h>
19 #include <Guid/FileInfo.h>
20
21 #define EFI_SHELL_PROTOCOL_GUID \
22 { \
23 0x6302d008, 0x7f9b, 0x4f30, { 0x87, 0xac, 0x60, 0xc9, 0xfe, 0xf5, 0xda, 0x4e } \
24 }
25
26 // replaced EFI_LIST_ENTRY with LIST_ENTRY for simplicity.
27 // they are identical outside of the name.
28 typedef struct {
29 LIST_ENTRY Link; ///< Linked list members.
30 EFI_STATUS Status; ///< Status of opening the file. Valid only if Handle != NULL.
31 CONST CHAR16 *FullName; ///< Fully qualified filename.
32 CONST CHAR16 *FileName; ///< name of this file.
33 SHELL_FILE_HANDLE Handle; ///< Handle for interacting with the opened file or NULL if closed.
34 EFI_FILE_INFO *Info; ///< Pointer to the FileInfo struct for this file or NULL.
35 } EFI_SHELL_FILE_INFO;
36
37 /**
38 Returns whether any script files are currently being processed.
39
40 @retval TRUE There is at least one script file active.
41 @retval FALSE No script files are active now.
42
43 **/
44 typedef
45 BOOLEAN
46 (EFIAPI *EFI_SHELL_BATCH_IS_ACTIVE) (
47 VOID
48 );
49
50 /**
51 Closes the file handle.
52
53 This function closes a specified file handle. All 'dirty' cached file data is
54 flushed to the device, and the file is closed. In all cases, the handle is
55 closed.
56
57 @param[in] FileHandle The file handle to be closed.
58
59 @retval EFI_SUCCESS The file closed sucessfully.
60 **/
61 typedef
62 EFI_STATUS
63 (EFIAPI *EFI_SHELL_CLOSE_FILE)(
64 IN SHELL_FILE_HANDLE FileHandle
65 );
66
67 /**
68 Creates a file or directory by name.
69
70 This function creates an empty new file or directory with the specified attributes and
71 returns the new file's handle. If the file already exists and is read-only, then
72 EFI_INVALID_PARAMETER will be returned.
73
74 If the file already existed, it is truncated and its attributes updated. If the file is
75 created successfully, the FileHandle is the file's handle, else, the FileHandle is NULL.
76
77 If the file name begins with >v, then the file handle which is returned refers to the
78 shell environment variable with the specified name. If the shell environment variable
79 already exists and is non-volatile then EFI_INVALID_PARAMETER is returned.
80
81 @param[in] FileName Pointer to NULL-terminated file path.
82 @param[in] FileAttribs The new file's attrbiutes. The different attributes are
83 described in EFI_FILE_PROTOCOL.Open().
84 @param[out] FileHandle On return, points to the created file handle or directory's handle.
85
86 @retval EFI_SUCCESS The file was opened. FileHandle points to the new file's handle.
87 @retval EFI_INVALID_PARAMETER One of the parameters has an invalid value.
88 @retval EFI_UNSUPPORTED The file path could not be opened.
89 @retval EFI_NOT_FOUND The specified file could not be found on the device, or could not
90 file the file system on the device.
91 @retval EFI_NO_MEDIA The device has no medium.
92 @retval EFI_MEDIA_CHANGED The device has a different medium in it or the medium is no
93 longer supported.
94 @retval EFI_DEVICE_ERROR The device reported an error or can't get the file path according
95 the DirName.
96 @retval EFI_VOLUME_CORRUPTED The file system structures are corrupted.
97 @retval EFI_WRITE_PROTECTED An attempt was made to create a file, or open a file for write
98 when the media is write-protected.
99 @retval EFI_ACCESS_DENIED The service denied access to the file.
100 @retval EFI_OUT_OF_RESOURCES Not enough resources were available to open the file.
101 @retval EFI_VOLUME_FULL The volume is full.
102 **/
103 typedef
104 EFI_STATUS
105 (EFIAPI *EFI_SHELL_CREATE_FILE)(
106 IN CONST CHAR16 *FileName,
107 IN UINT64 FileAttribs,
108 OUT SHELL_FILE_HANDLE *FileHandle
109 );
110
111 /**
112 Deletes the file specified by the file handle.
113
114 This function closes and deletes a file. In all cases, the file handle is closed. If the file
115 cannot be deleted, the warning code EFI_WARN_DELETE_FAILURE is returned, but the
116 handle is still closed.
117
118 @param[in] FileHandle The file handle to delete.
119
120 @retval EFI_SUCCESS The file was closed and deleted and the handle was closed.
121 @retval EFI_WARN_DELETE_FAILURE The handle was closed but the file was not deleted.
122 **/
123 typedef
124 EFI_STATUS
125 (EFIAPI *EFI_SHELL_DELETE_FILE)(
126 IN SHELL_FILE_HANDLE FileHandle
127 );
128
129 /**
130 Deletes the file specified by the file name.
131
132 This function deletes a file.
133
134 @param[in] FileName Points to the NULL-terminated file name.
135
136 @retval EFI_SUCCESS The file was deleted.
137 @retval EFI_WARN_DELETE_FAILURE The handle was closed but the file was not deleted.
138 **/
139 typedef
140 EFI_STATUS
141 (EFIAPI *EFI_SHELL_DELETE_FILE_BY_NAME)(
142 IN CONST CHAR16 *FileName
143 );
144
145 /**
146 Disables the page break output mode.
147 **/
148 typedef
149 VOID
150 (EFIAPI *EFI_SHELL_DISABLE_PAGE_BREAK) (
151 VOID
152 );
153
154 /**
155 Enables the page break output mode.
156 **/
157 typedef
158 VOID
159 (EFIAPI *EFI_SHELL_ENABLE_PAGE_BREAK) (
160 VOID
161 );
162
163 /**
164 Execute the command line.
165
166 This function creates a nested instance of the shell and executes the specified
167 command (CommandLine) with the specified environment (Environment). Upon return,
168 the status code returned by the specified command is placed in StatusCode.
169
170 If Environment is NULL, then the current environment is used and all changes made
171 by the commands executed will be reflected in the current environment. If the
172 Environment is non-NULL, then the changes made will be discarded.
173
174 The CommandLine is executed from the current working directory on the current
175 device.
176
177 @param[in] ParentImageHandle A handle of the image that is executing the specified
178 command line.
179 @param[in] CommandLine Points to the NULL-terminated UCS-2 encoded string
180 containing the command line. If NULL then the command-
181 line will be empty.
182 @param[in] Environment Points to a NULL-terminated array of environment
183 variables with the format 'x=y', where x is the
184 environment variable name and y is the value. If this
185 is NULL, then the current shell environment is used.
186 @param[out] ErrorCode Points to the status code returned by the command.
187
188 @retval EFI_SUCCESS The command executed successfully. The status code
189 returned by the command is pointed to by StatusCode.
190 @retval EFI_INVALID_PARAMETER The parameters are invalid.
191 @retval EFI_OUT_OF_RESOURCES Out of resources.
192 @retval EFI_UNSUPPORTED Nested shell invocations are not allowed.
193 **/
194 typedef
195 EFI_STATUS
196 (EFIAPI *EFI_SHELL_EXECUTE) (
197 IN EFI_HANDLE *ParentImageHandle,
198 IN CHAR16 *CommandLine OPTIONAL,
199 IN CHAR16 **Environment OPTIONAL,
200 OUT EFI_STATUS *StatusCode OPTIONAL
201 );
202
203 /**
204 Find files that match a specified pattern.
205
206 This function searches for all files and directories that match the specified
207 FilePattern. The FilePattern can contain wild-card characters. The resulting file
208 information is placed in the file list FileList.
209
210 The files in the file list are not opened. The OpenMode field is set to 0 and the FileInfo
211 field is set to NULL.
212
213 @param[in] FilePattern Points to a NULL-terminated shell file path, including wildcards.
214 @param[out] FileList On return, points to the start of a file list containing the names
215 of all matching files or else points to NULL if no matching files
216 were found.
217
218 @retval EFI_SUCCESS Files found.
219 @retval EFI_NOT_FOUND No files found.
220 @retval EFI_NO_MEDIA The device has no media.
221 @retval EFI_DEVICE_ERROR The device reported an error.
222 @retval EFI_VOLUME_CORRUPTED The file system structures are corrupted.
223 **/
224 typedef
225 EFI_STATUS
226 (EFIAPI *EFI_SHELL_FIND_FILES)(
227 IN CONST CHAR16 *FilePattern,
228 OUT EFI_SHELL_FILE_INFO **FileList
229 );
230
231 /**
232 Find all files in a specified directory.
233
234 @param[in] FileDirHandle Handle of the directory to search.
235 @param[out] FileList On return, points to the list of files in the directory
236 or NULL if there are no files in the directory.
237
238 @retval EFI_SUCCESS File information was returned successfully.
239 @retval EFI_VOLUME_CORRUPTED The file system structures have been corrupted.
240 @retval EFI_DEVICE_ERROR The device reported an error.
241 @retval EFI_NO_MEDIA The device media is not present.
242 **/
243 typedef
244 EFI_STATUS
245 (EFIAPI *EFI_SHELL_FIND_FILES_IN_DIR)(
246 IN SHELL_FILE_HANDLE FileDirHandle,
247 OUT EFI_SHELL_FILE_INFO **FileList
248 );
249
250 /**
251 Flushes data back to a device.
252
253 This function flushes all modified data associated with a file to a device.
254
255 @param[in] FileHandle The handle of the file to flush.
256
257 @retval EFI_SUCCESS The data was flushed.
258 @retval EFI_NO_MEDIA The device has no medium.
259 @retval EFI_DEVICE_ERROR The device reported an error.
260 @retval EFI_VOLUME_CORRUPTED The file system structures are corrupted.
261 @retval EFI_WRITE_PROTECTED The file or medium is write-protected.
262 @retval EFI_ACCESS_DENIED The file was opened read-only.
263 @retval EFI_VOLUME_FULL The volume is full.
264 **/
265 typedef
266 EFI_STATUS
267 (EFIAPI *EFI_SHELL_FLUSH_FILE)(
268 IN SHELL_FILE_HANDLE FileHandle
269 );
270
271 /**
272 Frees the file list.
273
274 This function cleans up the file list and any related data structures. It has no
275 impact on the files themselves.
276
277 @param[in] FileList The file list to free. Type EFI_SHELL_FILE_INFO is
278 defined in OpenFileList().
279
280 @retval EFI_SUCCESS Free the file list successfully.
281 **/
282 typedef
283 EFI_STATUS
284 (EFIAPI *EFI_SHELL_FREE_FILE_LIST) (
285 IN EFI_SHELL_FILE_INFO **FileList
286 );
287
288 /**
289 Returns the current directory on the specified device.
290
291 If FileSystemMapping is NULL, it returns the current working directory. If the
292 FileSystemMapping is not NULL, it returns the current directory associated with the
293 FileSystemMapping. In both cases, the returned name includes the file system
294 mapping (i.e. fs0:\current-dir).
295
296 @param[in] FileSystemMapping A pointer to the file system mapping. If NULL,
297 then the current working directory is returned.
298
299 @retval !=NULL The current directory.
300 @retval NULL Current directory does not exist.
301 **/
302 typedef
303 CONST CHAR16 *
304 (EFIAPI *EFI_SHELL_GET_CUR_DIR) (
305 IN CONST CHAR16 *FileSystemMapping OPTIONAL
306 );
307
308 typedef UINT32 EFI_SHELL_DEVICE_NAME_FLAGS;
309 #define EFI_DEVICE_NAME_USE_COMPONENT_NAME 0x00000001
310 #define EFI_DEVICE_NAME_USE_DEVICE_PATH 0x00000002
311
312 /**
313 Gets the name of the device specified by the device handle.
314
315 This function gets the user-readable name of the device specified by the device
316 handle. If no user-readable name could be generated, then *BestDeviceName will be
317 NULL and EFI_NOT_FOUND will be returned.
318
319 If EFI_DEVICE_NAME_USE_COMPONENT_NAME is set, then the function will return the
320 device's name using the EFI_COMPONENT_NAME2_PROTOCOL, if present on
321 DeviceHandle.
322
323 If EFI_DEVICE_NAME_USE_DEVICE_PATH is set, then the function will return the
324 device's name using the EFI_DEVICE_PATH_PROTOCOL, if present on DeviceHandle.
325 If both EFI_DEVICE_NAME_USE_COMPONENT_NAME and
326 EFI_DEVICE_NAME_USE_DEVICE_PATH are set, then
327 EFI_DEVICE_NAME_USE_COMPONENT_NAME will have higher priority.
328
329 @param[in] DeviceHandle The handle of the device.
330 @param[in] Flags Determines the possible sources of component names.
331 @param[in] Language A pointer to the language specified for the device
332 name, in the same format as described in the UEFI
333 specification, Appendix M.
334 @param[out] BestDeviceName On return, points to the callee-allocated NULL-
335 terminated name of the device. If no device name
336 could be found, points to NULL. The name must be
337 freed by the caller...
338
339 @retval EFI_SUCCESS Get the name successfully.
340 @retval EFI_NOT_FOUND Fail to get the device name.
341 **/
342 typedef
343 EFI_STATUS
344 (EFIAPI *EFI_SHELL_GET_DEVICE_NAME) (
345 IN EFI_HANDLE DeviceHandle,
346 IN EFI_SHELL_DEVICE_NAME_FLAGS Flags,
347 IN CHAR8 *Language,
348 OUT CHAR16 **BestDeviceName
349 );
350
351 /**
352 Gets the device path from the mapping.
353
354 This function gets the device path associated with a mapping.
355
356 @param[in] Mapping A pointer to the mapping
357
358 @retval !=NULL Pointer to the device path that corresponds to the
359 device mapping. The returned pointer does not need
360 to be freed.
361 @retval NULL There is no device path associated with the
362 specified mapping.
363 **/
364 typedef
365 CONST EFI_DEVICE_PATH_PROTOCOL *
366 (EFIAPI *EFI_SHELL_GET_DEVICE_PATH_FROM_MAP) (
367 IN CONST CHAR16 *Mapping
368 );
369
370 /**
371 Converts a file system style name to a device path.
372
373 This function converts a file system style name to a device path, by replacing any
374 mapping references to the associated device path.
375
376 @param[in] Path The pointer to the path.
377
378 @return The pointer of the file path. The file path is callee
379 allocated and should be freed by the caller.
380 **/
381 typedef
382 EFI_DEVICE_PATH_PROTOCOL *
383 (EFIAPI *EFI_SHELL_GET_DEVICE_PATH_FROM_FILE_PATH) (
384 IN CONST CHAR16 *Path
385 );
386
387 /**
388 Gets either a single or list of environment variables.
389
390 If name is not NULL then this function returns the current value of the specified
391 environment variable.
392
393 If Name is NULL than a list of all environment variable names is returned. Each a
394 NULL terminated string with a double NULL terminating the list.
395
396 @param[in] Name A pointer to the environment variable name. If
397 Name is NULL, then the function will return all
398 of the defined shell environment variables. In
399 the case where multiple environment variables are
400 being returned, each variable will be terminated by
401 a NULL, and the list will be terminated by a double
402 NULL.
403
404 @return A pointer to the returned string.
405 The returned pointer does not need to be freed by the caller.
406
407 @retval NULL The environment variable doesn't exist or there are
408 no environment variables.
409 **/
410 typedef
411 CONST CHAR16 *
412 (EFIAPI *EFI_SHELL_GET_ENV) (
413 IN CONST CHAR16 *Name OPTIONAL
414 );
415
416 /**
417 Gets the environment variable and Attributes, or list of environment variables. Can be
418 used instead of GetEnv().
419
420 This function returns the current value of the specified environment variable and
421 the Attributes. If no variable name was specified, then all of the known
422 variables will be returned.
423
424 @param[in] Name A pointer to the environment variable name. If Name is NULL,
425 then the function will return all of the defined shell
426 environment variables. In the case where multiple environment
427 variables are being returned, each variable will be terminated
428 by a NULL, and the list will be terminated by a double NULL.
429 @param[out] Attributes If not NULL, a pointer to the returned attributes bitmask for
430 the environment variable. In the case where Name is NULL, and
431 multiple environment variables are being returned, Attributes
432 is undefined.
433
434 @retval NULL The environment variable doesn't exist.
435 @return The environment variable's value. The returned pointer does not
436 need to be freed by the caller.
437 **/
438 typedef
439 CONST CHAR16 *
440 (EFIAPI *EFI_SHELL_GET_ENV_EX) (
441 IN CONST CHAR16 *Name,
442 OUT UINT32 *Attributes OPTIONAL
443 );
444
445 /**
446 Gets the file information from an open file handle.
447
448 This function allocates a buffer to store the file's information. It's the caller's
449 responsibility to free the buffer.
450
451 @param[in] FileHandle A File Handle.
452
453 @retval NULL Cannot get the file info.
454 @return A pointer to a buffer with file information.
455 **/
456 typedef
457 EFI_FILE_INFO *
458 (EFIAPI *EFI_SHELL_GET_FILE_INFO)(
459 IN SHELL_FILE_HANDLE FileHandle
460 );
461
462 /**
463 Converts a device path to a file system-style path.
464
465 This function converts a device path to a file system path by replacing part, or all, of
466 the device path with the file-system mapping. If there are more than one application
467 file system mappings, the one that most closely matches Path will be used.
468
469 @param[in] Path The pointer to the device path.
470
471 @return The pointer of the NULL-terminated file path. The path
472 is callee-allocated and should be freed by the caller.
473 **/
474 typedef
475 CHAR16 *
476 (EFIAPI *EFI_SHELL_GET_FILE_PATH_FROM_DEVICE_PATH) (
477 IN CONST EFI_DEVICE_PATH_PROTOCOL *Path
478 );
479
480 /**
481 Gets a file's current position.
482
483 This function returns the current file position for the file handle. For directories, the
484 current file position has no meaning outside of the file system driver and as such, the
485 operation is not supported.
486
487 @param[in] FileHandle The file handle on which to get the current position.
488 @param[out] Position Byte position from the start of the file.
489
490 @retval EFI_SUCCESS Data was accessed.
491 @retval EFI_UNSUPPORTED The request is not valid on open directories.
492 **/
493 typedef
494 EFI_STATUS
495 (EFIAPI *EFI_SHELL_GET_FILE_POSITION)(
496 IN SHELL_FILE_HANDLE FileHandle,
497 OUT UINT64 *Position
498 );
499
500 /**
501 Gets the size of a file.
502
503 This function returns the size of the file specified by FileHandle.
504
505 @param[in] FileHandle The handle of the file.
506 @param[out] Size The size of this file.
507
508 @retval EFI_SUCCESS Get the file's size.
509 @retval EFI_DEVICE_ERROR Can't access the file.
510 **/
511 typedef
512 EFI_STATUS
513 (EFIAPI *EFI_SHELL_GET_FILE_SIZE)(
514 IN SHELL_FILE_HANDLE FileHandle,
515 OUT UINT64 *Size
516 );
517
518 /**
519 Get the GUID value from a human readable name.
520
521 If GuidName is a known GUID name, then update Guid to have the correct value for
522 that GUID.
523
524 This function is only available when the major and minor versions in the
525 EfiShellProtocol are greater than or equal to 2 and 1, respectively.
526
527 @param[in] GuidName A pointer to the localized name for the GUID being queried.
528 @param[out] Guid A pointer to the GUID structure to be filled in.
529
530 @retval EFI_SUCCESS The operation was successful.
531 @retval EFI_INVALID_PARAMETER Guid was NULL.
532 @retval EFI_INVALID_PARAMETER GuidName was NULL.
533 @retval EFI_NOT_FOUND GuidName is not a known GUID Name.
534 **/
535 typedef
536 EFI_STATUS
537 (EFIAPI *EFI_SHELL_GET_GUID_FROM_NAME)(
538 IN CONST CHAR16 *GuidName,
539 OUT EFI_GUID *Guid
540 );
541
542 /**
543 Get the human readable name for a GUID from the value.
544
545 If Guid is assigned a name, then update *GuidName to point to the name. The callee
546 should not modify the value.
547
548 This function is only available when the major and minor versions in the
549 EfiShellProtocol are greater than or equal to 2 and 1, respectively.
550
551 @param[in] Guid A pointer to the GUID being queried.
552 @param[out] GuidName A pointer to a pointer the localized to name for the GUID being requested
553
554 @retval EFI_SUCCESS The operation was successful.
555 @retval EFI_INVALID_PARAMETER Guid was NULL.
556 @retval EFI_INVALID_PARAMETER GuidName was NULL.
557 @retval EFI_NOT_FOUND Guid is not assigned a name.
558 **/
559 typedef
560 EFI_STATUS
561 (EFIAPI *EFI_SHELL_GET_GUID_NAME)(
562 IN CONST EFI_GUID *Guid,
563 OUT CONST CHAR16 **GuidName
564 );
565
566 /**
567 Return help information about a specific command.
568
569 This function returns the help information for the specified command. The help text
570 can be internal to the shell or can be from a UEFI Shell manual page.
571
572 If Sections is specified, then each section name listed will be compared in a casesensitive
573 manner, to the section names described in Appendix B. If the section exists,
574 it will be appended to the returned help text. If the section does not exist, no
575 information will be returned. If Sections is NULL, then all help text information
576 available will be returned.
577
578 @param[in] Command Points to the NULL-terminated UEFI Shell command name.
579 @param[in] Sections Points to the NULL-terminated comma-delimited
580 section names to return. If NULL, then all
581 sections will be returned.
582 @param[out] HelpText On return, points to a callee-allocated buffer
583 containing all specified help text.
584
585 @retval EFI_SUCCESS The help text was returned.
586 @retval EFI_OUT_OF_RESOURCES The necessary buffer could not be allocated to hold the
587 returned help text.
588 @retval EFI_INVALID_PARAMETER HelpText is NULL.
589 @retval EFI_NOT_FOUND There is no help text available for Command.
590 **/
591 typedef
592 EFI_STATUS
593 (EFIAPI *EFI_SHELL_GET_HELP_TEXT) (
594 IN CONST CHAR16 *Command,
595 IN CONST CHAR16 *Sections OPTIONAL,
596 OUT CHAR16 **HelpText
597 );
598
599 /**
600 Gets the mapping(s) that most closely matches the device path.
601
602 This function gets the mapping which corresponds to the device path *DevicePath. If
603 there is no exact match, then the mapping which most closely matches *DevicePath
604 is returned, and *DevicePath is updated to point to the remaining portion of the
605 device path. If there is an exact match, the mapping is returned and *DevicePath
606 points to the end-of-device-path node.
607
608 If there are multiple map names they will be semi-colon seperated in the
609 NULL-terminated string.
610
611 @param[in, out] DevicePath On entry, points to a device path pointer. On
612 exit, updates the pointer to point to the
613 portion of the device path after the mapping.
614
615 @retval NULL No mapping was found.
616 @retval !=NULL Pointer to NULL-terminated mapping. The buffer
617 is callee allocated and should be freed by the caller.
618 **/
619 typedef
620 CONST CHAR16 *
621 (EFIAPI *EFI_SHELL_GET_MAP_FROM_DEVICE_PATH) (
622 IN OUT EFI_DEVICE_PATH_PROTOCOL **DevicePath
623 );
624
625 /**
626 Gets the enable status of the page break output mode.
627
628 User can use this function to determine current page break mode.
629
630 @retval TRUE The page break output mode is enabled.
631 @retval FALSE The page break output mode is disabled.
632 **/
633 typedef
634 BOOLEAN
635 (EFIAPI *EFI_SHELL_GET_PAGE_BREAK) (
636 VOID
637 );
638
639 /**
640 Judges whether the active shell is the root shell.
641
642 This function makes the user to know that whether the active Shell is the root shell.
643
644 @retval TRUE The active Shell is the root Shell.
645 @retval FALSE The active Shell is NOT the root Shell.
646 **/
647 typedef
648 BOOLEAN
649 (EFIAPI *EFI_SHELL_IS_ROOT_SHELL) (
650 VOID
651 );
652
653 /**
654 Opens a file or a directory by file name.
655
656 This function opens the specified file in the specified OpenMode and returns a file
657 handle.
658 If the file name begins with '>v', then the file handle which is returned refers to the
659 shell environment variable with the specified name. If the shell environment variable
660 exists, is non-volatile and the OpenMode indicates EFI_FILE_MODE_WRITE, then
661 EFI_INVALID_PARAMETER is returned.
662
663 If the file name is '>i', then the file handle which is returned refers to the standard
664 input. If the OpenMode indicates EFI_FILE_MODE_WRITE, then EFI_INVALID_PARAMETER
665 is returned.
666
667 If the file name is '>o', then the file handle which is returned refers to the standard
668 output. If the OpenMode indicates EFI_FILE_MODE_READ, then EFI_INVALID_PARAMETER
669 is returned.
670
671 If the file name is '>e', then the file handle which is returned refers to the standard
672 error. If the OpenMode indicates EFI_FILE_MODE_READ, then EFI_INVALID_PARAMETER
673 is returned.
674
675 If the file name is 'NUL', then the file handle that is returned refers to the standard NUL
676 file. If the OpenMode indicates EFI_FILE_MODE_READ, then EFI_INVALID_PARAMETER is
677 returned.
678
679 If return EFI_SUCCESS, the FileHandle is the opened file's handle, else, the
680 FileHandle is NULL.
681
682 @param[in] FileName Points to the NULL-terminated UCS-2 encoded file name.
683 @param[out] FileHandle On return, points to the file handle.
684 @param[in] OpenMode File open mode. Either EFI_FILE_MODE_READ or
685 EFI_FILE_MODE_WRITE from section 12.4 of the UEFI
686 Specification.
687 @retval EFI_SUCCESS The file was opened. FileHandle has the opened file's handle.
688 @retval EFI_INVALID_PARAMETER One of the parameters has an invalid value. FileHandle is NULL.
689 @retval EFI_UNSUPPORTED Could not open the file path. FileHandle is NULL.
690 @retval EFI_NOT_FOUND The specified file could not be found on the device or the file
691 system could not be found on the device. FileHandle is NULL.
692 @retval EFI_NO_MEDIA The device has no medium. FileHandle is NULL.
693 @retval EFI_MEDIA_CHANGED The device has a different medium in it or the medium is no
694 longer supported. FileHandle is NULL.
695 @retval EFI_DEVICE_ERROR The device reported an error or can't get the file path according
696 the FileName. FileHandle is NULL.
697 @retval EFI_VOLUME_CORRUPTED The file system structures are corrupted. FileHandle is NULL.
698 @retval EFI_WRITE_PROTECTED An attempt was made to create a file, or open a file for write
699 when the media is write-protected. FileHandle is NULL.
700 @retval EFI_ACCESS_DENIED The service denied access to the file. FileHandle is NULL.
701 @retval EFI_OUT_OF_RESOURCES Not enough resources were available to open the file. FileHandle
702 is NULL.
703 @retval EFI_VOLUME_FULL The volume is full. FileHandle is NULL.
704 **/
705 typedef
706 EFI_STATUS
707 (EFIAPI *EFI_SHELL_OPEN_FILE_BY_NAME) (
708 IN CONST CHAR16 *FileName,
709 OUT SHELL_FILE_HANDLE *FileHandle,
710 IN UINT64 OpenMode
711 );
712
713 /**
714 Opens the files that match the path specified.
715
716 This function opens all of the files specified by Path. Wildcards are processed
717 according to the rules specified in UEFI Shell 2.0 spec section 3.7.1. Each
718 matching file has an EFI_SHELL_FILE_INFO structure created in a linked list.
719
720 @param[in] Path A pointer to the path string.
721 @param[in] OpenMode Specifies the mode used to open each file, EFI_FILE_MODE_READ or
722 EFI_FILE_MODE_WRITE.
723 @param[in, out] FileList Points to the start of a list of files opened.
724
725 @retval EFI_SUCCESS Create the file list successfully.
726 @return Can't create the file list.
727 **/
728 typedef
729 EFI_STATUS
730 (EFIAPI *EFI_SHELL_OPEN_FILE_LIST) (
731 IN CHAR16 *Path,
732 IN UINT64 OpenMode,
733 IN OUT EFI_SHELL_FILE_INFO **FileList
734 );
735
736 /**
737 Opens the root directory of a device.
738
739 This function opens the root directory of a device and returns a file handle to it.
740
741 @param[in] DevicePath Points to the device path corresponding to the device where the
742 EFI_SIMPLE_FILE_SYSTEM_PROTOCOL is installed.
743 @param[out] FileHandle On exit, points to the file handle corresponding to the root directory on the
744 device.
745
746 @retval EFI_SUCCESS Root opened successfully.
747 @retval EFI_NOT_FOUND EFI_SIMPLE_FILE_SYSTEM could not be found or the root directory
748 could not be opened.
749 @retval EFI_VOLUME_CORRUPTED The data structures in the volume were corrupted.
750 @retval EFI_DEVICE_ERROR The device had an error.
751 **/
752 typedef
753 EFI_STATUS
754 (EFIAPI *EFI_SHELL_OPEN_ROOT)(
755 IN EFI_DEVICE_PATH_PROTOCOL *DevicePath,
756 OUT SHELL_FILE_HANDLE *FileHandle
757 );
758
759 /**
760 Opens the root directory of a device on a handle.
761
762 This function opens the root directory of a device and returns a file handle to it.
763
764 @param[in] DeviceHandle The handle of the device that contains the volume.
765 @param[out] FileHandle On exit, points to the file handle corresponding to the root directory on the
766 device.
767
768 @retval EFI_SUCCESS Root opened successfully.
769 @retval EFI_NOT_FOUND EFI_SIMPLE_FILE_SYSTEM could not be found or the root directory
770 could not be opened.
771 @retval EFI_VOLUME_CORRUPTED The data structures in the volume were corrupted.
772 @retval EFI_DEVICE_ERROR The device had an error.
773 **/
774 typedef
775 EFI_STATUS
776 (EFIAPI *EFI_SHELL_OPEN_ROOT_BY_HANDLE)(
777 IN EFI_HANDLE DeviceHandle,
778 OUT SHELL_FILE_HANDLE *FileHandle
779 );
780
781 /**
782 Reads data from the file.
783
784 If FileHandle is not a directory, the function reads the requested number of bytes
785 from the file at the file's current position and returns them in Buffer. If the read goes
786 beyond the end of the file, the read length is truncated to the end of the file. The file's
787 current position is increased by the number of bytes returned.
788 If FileHandle is a directory, then an error is returned.
789
790 @param[in] FileHandle The opened file handle for read.
791 @param[in] ReadSize On input, the size of Buffer, in bytes. On output, the amount of data read.
792 @param[in, out] Buffer The buffer in which data is read.
793
794 @retval EFI_SUCCESS Data was read.
795 @retval EFI_NO_MEDIA The device has no media.
796 @retval EFI_DEVICE_ERROR The device reported an error.
797 @retval EFI_VOLUME_CORRUPTED The file system structures are corrupted.
798 @retval EFI_BUFFER_TO_SMALL Buffer is too small. ReadSize contains required size.
799 **/
800 typedef
801 EFI_STATUS
802 (EFIAPI *EFI_SHELL_READ_FILE) (
803 IN SHELL_FILE_HANDLE FileHandle,
804 IN OUT UINTN *ReadSize,
805 IN OUT VOID *Buffer
806 );
807
808 /**
809 Register a GUID and a localized human readable name for it.
810
811 If Guid is not assigned a name, then assign GuidName to Guid. This list of GUID
812 names must be used whenever a shell command outputs GUID information.
813
814 This function is only available when the major and minor versions in the
815 EfiShellProtocol are greater than or equal to 2 and 1, respectively.
816
817 @param[in] Guid A pointer to the GUID being registered.
818 @param[in] GuidName A pointer to the localized name for the GUID being registered.
819
820 @retval EFI_SUCCESS The operation was successful.
821 @retval EFI_INVALID_PARAMETER Guid was NULL.
822 @retval EFI_INVALID_PARAMETER GuidName was NULL.
823 @retval EFI_ACCESS_DENIED Guid already is assigned a name.
824 **/
825 typedef
826 EFI_STATUS
827 (EFIAPI *EFI_SHELL_REGISTER_GUID_NAME)(
828 IN CONST EFI_GUID *Guid,
829 IN CONST CHAR16 *GuidName
830 );
831
832 /**
833 Deletes the duplicate file names files in the given file list.
834
835 @param[in] FileList A pointer to the first entry in the file list.
836
837 @retval EFI_SUCCESS Always success.
838 **/
839 typedef
840 EFI_STATUS
841 (EFIAPI *EFI_SHELL_REMOVE_DUP_IN_FILE_LIST) (
842 IN EFI_SHELL_FILE_INFO **FileList
843 );
844
845 /**
846 Changes a shell command alias.
847
848 This function creates an alias for a shell command.
849
850 @param[in] Command Points to the NULL-terminated shell command or existing alias.
851 @param[in] Alias Points to the NULL-terminated alias for the shell command. If this is NULL, and
852 Command refers to an alias, that alias will be deleted.
853 @param[in] Replace If TRUE and the alias already exists, then the existing alias will be replaced. If
854 FALSE and the alias already exists, then the existing alias is unchanged and
855 EFI_ACCESS_DENIED is returned.
856 @param[in] Volatile if TRUE the Alias being set will be stored in a volatile fashion. if FALSE the
857 Alias being set will be stored in a non-volatile fashion.
858
859 @retval EFI_SUCCESS Alias created or deleted successfully.
860 @retval EFI_ACCESS_DENIED The alias is a built-in alias or already existed and Replace was set to
861 FALSE.
862 **/
863 typedef
864 EFI_STATUS
865 (EFIAPI *EFI_SHELL_SET_ALIAS)(
866 IN CONST CHAR16 *Command,
867 IN CONST CHAR16 *Alias,
868 IN BOOLEAN Replace,
869 IN BOOLEAN Volatile
870 );
871
872 /**
873 This function returns the command associated with a alias or a list of all
874 alias'.
875
876 @param[in] Alias Points to the NULL-terminated shell alias.
877 If this parameter is NULL, then all
878 aliases will be returned in ReturnedData.
879 @param[out] Volatile Upon return of a single command if TRUE indicates
880 this is stored in a volatile fashion. FALSE otherwise.
881 @return If Alias is not NULL, it will return a pointer to
882 the NULL-terminated command for that alias.
883 If Alias is NULL, ReturnedData points to a ';'
884 delimited list of alias (e.g.
885 ReturnedData = "dir;del;copy;mfp") that is NULL-terminated.
886 @retval NULL An error ocurred.
887 @retval NULL Alias was not a valid Alias.
888 **/
889 typedef
890 CONST CHAR16 *
891 (EFIAPI *EFI_SHELL_GET_ALIAS)(
892 IN CONST CHAR16 *Alias,
893 OUT BOOLEAN *Volatile OPTIONAL
894 );
895
896 /**
897 Changes the current directory on the specified device.
898
899 If the FileSystem is NULL, and the directory Dir does not contain a file system's
900 mapped name, this function changes the current working directory. If FileSystem is
901 NULL and the directory Dir contains a mapped name, then the current file system and
902 the current directory on that file system are changed.
903
904 If FileSystem is not NULL, and Dir is NULL, then this changes the current working file
905 system.
906
907 If FileSystem is not NULL and Dir is not NULL, then this function changes the current
908 directory on the specified file system.
909
910 If the current working directory or the current working file system is changed then the
911 %cwd% environment variable will be updated.
912
913 @param[in] FileSystem A pointer to the file system's mapped name. If NULL, then the current working
914 directory is changed.
915 @param[in] Dir Points to the NULL-terminated directory on the device specified by FileSystem.
916
917 @retval NULL Current directory does not exist.
918 @return The current directory.
919 **/
920 typedef
921 EFI_STATUS
922 (EFIAPI *EFI_SHELL_SET_CUR_DIR) (
923 IN CONST CHAR16 *FileSystem OPTIONAL,
924 IN CONST CHAR16 *Dir
925 );
926
927 /**
928 Sets the environment variable.
929
930 This function changes the current value of the specified environment variable. If the
931 environment variable exists and the Value is an empty string, then the environment
932 variable is deleted. If the environment variable exists and the Value is not an empty
933 string, then the value of the environment variable is changed. If the environment
934 variable does not exist and the Value is an empty string, there is no action. If the
935 environment variable does not exist and the Value is a non-empty string, then the
936 environment variable is created and assigned the specified value.
937
938 For a description of volatile and non-volatile environment variables, see UEFI Shell
939 2.0 specification section 3.6.1.
940
941 @param[in] Name Points to the NULL-terminated environment variable name.
942 @param[in] Value Points to the NULL-terminated environment variable value. If the value is an
943 empty string then the environment variable is deleted.
944 @param[in] Volatile Indicates whether the variable is non-volatile (FALSE) or volatile (TRUE).
945
946 @retval EFI_SUCCESS The environment variable was successfully updated.
947 **/
948 typedef
949 EFI_STATUS
950 (EFIAPI *EFI_SHELL_SET_ENV) (
951 IN CONST CHAR16 *Name,
952 IN CONST CHAR16 *Value,
953 IN BOOLEAN Volatile
954 );
955
956 /**
957 Sets the file information to an opened file handle.
958
959 This function changes file information. All file information in the EFI_FILE_INFO
960 struct will be updated to the passed in data.
961
962 @param[in] FileHandle A file handle.
963 @param[in] FileInfo Points to new file information.
964
965 @retval EFI_SUCCESS The information was set.
966 @retval EFI_NO_MEDIA The device has no medium.
967 @retval EFI_DEVICE_ERROR The device reported an error.
968 @retval EFI_VOLUME_CORRUPTED The file system structures are corrupted.
969 @retval EFI_WRITE_PROTECTED The file or medium is write-protected.
970 @retval EFI_ACCESS_DENIED The file was opened read-only.
971 @retval EFI_VOLUME_FULL The volume is full.
972 @retval EFI_BAD_BUFFER_SIZE BufferSize is smaller than the size of EFI_FILE_INFO.
973 **/
974 typedef
975 EFI_STATUS
976 (EFIAPI *EFI_SHELL_SET_FILE_INFO)(
977 IN SHELL_FILE_HANDLE FileHandle,
978 IN CONST EFI_FILE_INFO *FileInfo
979 );
980
981 /**
982 Sets a file's current position.
983
984 This function sets the current file position for the handle to the position supplied. With
985 the exception of seeking to position 0xFFFFFFFFFFFFFFFF, only absolute positioning is
986 supported, and seeking past the end of the file is allowed (a subsequent write would
987 grow the file). Seeking to position 0xFFFFFFFFFFFFFFFF causes the current position
988 to be set to the end of the file.
989
990 @param[in] FileHandle The file handle on which requested position will be set.
991 @param[in] Position Byte position from the start of the file.
992
993 @retval EFI_SUCCESS Data was written.
994 @retval EFI_UNSUPPORTED The seek request for nonzero is not valid on open directories.
995 **/
996 typedef
997 EFI_STATUS
998 (EFIAPI *EFI_SHELL_SET_FILE_POSITION)(
999 IN SHELL_FILE_HANDLE FileHandle,
1000 IN UINT64 Position
1001 );
1002
1003 /**
1004 This function creates a mapping for a device path.
1005
1006 @param[in] DevicePath Points to the device path. If this is NULL and Mapping points to a valid mapping,
1007 then the mapping will be deleted.
1008 @param[in] Mapping Points to the NULL-terminated mapping for the device path.
1009
1010 @retval EFI_SUCCESS Mapping created or deleted successfully.
1011 @retval EFI_NO_MAPPING There is no handle that corresponds exactly to DevicePath. See the
1012 boot service function LocateDevicePath().
1013 @retval EFI_ACCESS_DENIED The mapping is a built-in alias.
1014 **/
1015 typedef
1016 EFI_STATUS
1017 (EFIAPI *EFI_SHELL_SET_MAP)(
1018 IN CONST EFI_DEVICE_PATH_PROTOCOL *DevicePath,
1019 IN CONST CHAR16 *Mapping
1020 );
1021
1022 /**
1023 Writes data to the file.
1024
1025 This function writes the specified number of bytes to the file at the current file position.
1026 The current file position is advanced the actual number of bytes written, which is
1027 returned in BufferSize. Partial writes only occur when there has been a data error
1028 during the write attempt (such as "volume space full"). The file automatically grows to
1029 hold the data, if required.
1030
1031 Direct writes to opened directories are not supported.
1032
1033 @param[in] FileHandle The opened file handle for writing.
1034 @param[in, out] BufferSize On input, size of Buffer.
1035 @param[in] Buffer The buffer in which data to write.
1036
1037 @retval EFI_SUCCESS Data was written.
1038 @retval EFI_UNSUPPORTED Writes to open directory are not supported.
1039 @retval EFI_NO_MEDIA The device has no media.
1040 @retval EFI_DEVICE_ERROR The device reported an error.
1041 @retval EFI_VOLUME_CORRUPTED The file system structures are corrupted.
1042 @retval EFI_WRITE_PROTECTED The device is write-protected.
1043 @retval EFI_ACCESS_DENIED The file was open for read only.
1044 @retval EFI_VOLUME_FULL The volume is full.
1045 **/
1046 typedef
1047 EFI_STATUS
1048 (EFIAPI *EFI_SHELL_WRITE_FILE)(
1049 IN SHELL_FILE_HANDLE FileHandle,
1050 IN OUT UINTN *BufferSize,
1051 IN VOID *Buffer
1052 );
1053
1054 typedef struct _EFI_SHELL_PROTOCOL {
1055 EFI_SHELL_EXECUTE Execute;
1056 EFI_SHELL_GET_ENV GetEnv;
1057 EFI_SHELL_SET_ENV SetEnv;
1058 EFI_SHELL_GET_ALIAS GetAlias;
1059 EFI_SHELL_SET_ALIAS SetAlias;
1060 EFI_SHELL_GET_HELP_TEXT GetHelpText;
1061 EFI_SHELL_GET_DEVICE_PATH_FROM_MAP GetDevicePathFromMap;
1062 EFI_SHELL_GET_MAP_FROM_DEVICE_PATH GetMapFromDevicePath;
1063 EFI_SHELL_GET_DEVICE_PATH_FROM_FILE_PATH GetDevicePathFromFilePath;
1064 EFI_SHELL_GET_FILE_PATH_FROM_DEVICE_PATH GetFilePathFromDevicePath;
1065 EFI_SHELL_SET_MAP SetMap;
1066 EFI_SHELL_GET_CUR_DIR GetCurDir;
1067 EFI_SHELL_SET_CUR_DIR SetCurDir;
1068 EFI_SHELL_OPEN_FILE_LIST OpenFileList;
1069 EFI_SHELL_FREE_FILE_LIST FreeFileList;
1070 EFI_SHELL_REMOVE_DUP_IN_FILE_LIST RemoveDupInFileList;
1071 EFI_SHELL_BATCH_IS_ACTIVE BatchIsActive;
1072 EFI_SHELL_IS_ROOT_SHELL IsRootShell;
1073 EFI_SHELL_ENABLE_PAGE_BREAK EnablePageBreak;
1074 EFI_SHELL_DISABLE_PAGE_BREAK DisablePageBreak;
1075 EFI_SHELL_GET_PAGE_BREAK GetPageBreak;
1076 EFI_SHELL_GET_DEVICE_NAME GetDeviceName;
1077 EFI_SHELL_GET_FILE_INFO GetFileInfo;
1078 EFI_SHELL_SET_FILE_INFO SetFileInfo;
1079 EFI_SHELL_OPEN_FILE_BY_NAME OpenFileByName;
1080 EFI_SHELL_CLOSE_FILE CloseFile;
1081 EFI_SHELL_CREATE_FILE CreateFile;
1082 EFI_SHELL_READ_FILE ReadFile;
1083 EFI_SHELL_WRITE_FILE WriteFile;
1084 EFI_SHELL_DELETE_FILE DeleteFile;
1085 EFI_SHELL_DELETE_FILE_BY_NAME DeleteFileByName;
1086 EFI_SHELL_GET_FILE_POSITION GetFilePosition;
1087 EFI_SHELL_SET_FILE_POSITION SetFilePosition;
1088 EFI_SHELL_FLUSH_FILE FlushFile;
1089 EFI_SHELL_FIND_FILES FindFiles;
1090 EFI_SHELL_FIND_FILES_IN_DIR FindFilesInDir;
1091 EFI_SHELL_GET_FILE_SIZE GetFileSize;
1092 EFI_SHELL_OPEN_ROOT OpenRoot;
1093 EFI_SHELL_OPEN_ROOT_BY_HANDLE OpenRootByHandle;
1094 EFI_EVENT ExecutionBreak;
1095 UINT32 MajorVersion;
1096 UINT32 MinorVersion;
1097 } EFI_SHELL_PROTOCOL;
1098
1099 //
1100 // The new structure with extra functions for UEFI Shell Specification 2.1
1101 //
1102 typedef struct _EFI_SHELL_PROTOCOL21 {
1103 EFI_SHELL_EXECUTE Execute;
1104 EFI_SHELL_GET_ENV GetEnv;
1105 EFI_SHELL_SET_ENV SetEnv;
1106 EFI_SHELL_GET_ALIAS GetAlias;
1107 EFI_SHELL_SET_ALIAS SetAlias;
1108 EFI_SHELL_GET_HELP_TEXT GetHelpText;
1109 EFI_SHELL_GET_DEVICE_PATH_FROM_MAP GetDevicePathFromMap;
1110 EFI_SHELL_GET_MAP_FROM_DEVICE_PATH GetMapFromDevicePath;
1111 EFI_SHELL_GET_DEVICE_PATH_FROM_FILE_PATH GetDevicePathFromFilePath;
1112 EFI_SHELL_GET_FILE_PATH_FROM_DEVICE_PATH GetFilePathFromDevicePath;
1113 EFI_SHELL_SET_MAP SetMap;
1114 EFI_SHELL_GET_CUR_DIR GetCurDir;
1115 EFI_SHELL_SET_CUR_DIR SetCurDir;
1116 EFI_SHELL_OPEN_FILE_LIST OpenFileList;
1117 EFI_SHELL_FREE_FILE_LIST FreeFileList;
1118 EFI_SHELL_REMOVE_DUP_IN_FILE_LIST RemoveDupInFileList;
1119 EFI_SHELL_BATCH_IS_ACTIVE BatchIsActive;
1120 EFI_SHELL_IS_ROOT_SHELL IsRootShell;
1121 EFI_SHELL_ENABLE_PAGE_BREAK EnablePageBreak;
1122 EFI_SHELL_DISABLE_PAGE_BREAK DisablePageBreak;
1123 EFI_SHELL_GET_PAGE_BREAK GetPageBreak;
1124 EFI_SHELL_GET_DEVICE_NAME GetDeviceName;
1125 EFI_SHELL_GET_FILE_INFO GetFileInfo;
1126 EFI_SHELL_SET_FILE_INFO SetFileInfo;
1127 EFI_SHELL_OPEN_FILE_BY_NAME OpenFileByName;
1128 EFI_SHELL_CLOSE_FILE CloseFile;
1129 EFI_SHELL_CREATE_FILE CreateFile;
1130 EFI_SHELL_READ_FILE ReadFile;
1131 EFI_SHELL_WRITE_FILE WriteFile;
1132 EFI_SHELL_DELETE_FILE DeleteFile;
1133 EFI_SHELL_DELETE_FILE_BY_NAME DeleteFileByName;
1134 EFI_SHELL_GET_FILE_POSITION GetFilePosition;
1135 EFI_SHELL_SET_FILE_POSITION SetFilePosition;
1136 EFI_SHELL_FLUSH_FILE FlushFile;
1137 EFI_SHELL_FIND_FILES FindFiles;
1138 EFI_SHELL_FIND_FILES_IN_DIR FindFilesInDir;
1139 EFI_SHELL_GET_FILE_SIZE GetFileSize;
1140 EFI_SHELL_OPEN_ROOT OpenRoot;
1141 EFI_SHELL_OPEN_ROOT_BY_HANDLE OpenRootByHandle;
1142 EFI_EVENT ExecutionBreak;
1143 UINT32 MajorVersion;
1144 UINT32 MinorVersion;
1145 // Added for Shell 2.1
1146 EFI_SHELL_REGISTER_GUID_NAME RegisterGuidName;
1147 EFI_SHELL_GET_GUID_NAME GetGuidName;
1148 EFI_SHELL_GET_GUID_FROM_NAME GetGuidFromName;
1149 EFI_SHELL_GET_ENV_EX GetEnvEx;
1150 } EFI_SHELL_PROTOCOL21;
1151
1152 extern EFI_GUID gEfiShellProtocolGuid;
1153
1154 enum ShellVersion {
1155 SHELL_MAJOR_VERSION = 2,
1156 SHELL_MINOR_VERSION = 1
1157 };
1158
1159 #endif