]> git.proxmox.com Git - mirror_edk2.git/blob - ShellPkg/Include/ShellBase.h
move DeleteScriptFileStruct from a private to a public function. This allows for...
[mirror_edk2.git] / ShellPkg / Include / ShellBase.h
1 /** @file
2 Root include file for Shell Package modules that utilize the SHELL_RETURN type
3
4 Copyright (c) 2009 - 2010, 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 __SHELL_BASE__
16 #define __SHELL_BASE__
17
18 typedef VOID *SHELL_FILE_HANDLE;
19
20 #ifndef SHELL_FREE_NON_NULL
21 #define SHELL_FREE_NON_NULL(Pointer) \
22 do { \
23 if (Pointer != NULL) { \
24 FreePool(Pointer); \
25 } \
26 } while(FALSE)
27 #endif //SHELL_FREE_NON_NULL
28
29 typedef enum {
30 ///
31 /// The operation completed successfully.
32 ///
33 SHELL_SUCCESS = 0,
34
35 ///
36 /// The image failed to load.
37 ///
38 SHELL_LOAD_ERROR = 1,
39
40 ///
41 /// The parameter was incorrect.
42 ///
43 SHELL_INVALID_PARAMETER = 2,
44
45 ///
46 /// The operation is not supported.
47 ///
48 SHELL_UNSUPPORTED = 3,
49
50 ///
51 /// The buffer was not the proper size for the request.
52 ///
53 SHELL_BAD_BUFFER_SIZE = 4,
54
55 ///
56 /// The buffer was not large enough to hold the requested data.
57 /// The required buffer size is returned in the appropriate
58 /// parameter when this error occurs.
59 ///
60 SHELL_BUFFER_TOO_SMALL = 5,
61
62 ///
63 /// There is no data pending upon return.
64 ///
65 SHELL_NOT_READY = 6,
66
67 ///
68 /// The physical device reported an error while attempting the
69 /// operation.
70 ///
71 SHELL_DEVICE_ERROR = 7,
72
73 ///
74 /// The device cannot be written to.
75 ///
76 SHELL_WRITE_PROTECTED = 8,
77
78 ///
79 /// The resource has run out.
80 ///
81 SHELL_OUT_OF_RESOURCES = 9,
82
83 ///
84 /// An inconsistency was detected on the file system causing the
85 /// operation to fail.
86 ///
87 SHELL_VOLUME_CORRUPTED = 10,
88
89 ///
90 /// There is no more space on the file system.
91 ///
92 SHELL_VOLUME_FULL = 11,
93
94 ///
95 /// The device does not contain any medium to perform the
96 /// operation.
97 ///
98 SHELL_NO_MEDIA = 12,
99
100 ///
101 /// The medium in the device has changed since the last
102 /// access.
103 ///
104 SHELL_MEDIA_CHANGED = 13,
105
106 ///
107 /// The item was not found.
108 ///
109 SHELL_NOT_FOUND = 14,
110
111 ///
112 /// Access was denied.
113 ///
114 SHELL_ACCESS_DENIED = 15,
115
116 // note the skipping of 16 and 17
117
118 ///
119 /// A timeout time expired.
120 ///
121 SHELL_TIMEOUT = 18,
122
123 ///
124 /// The protocol has not been started.
125 ///
126 SHELL_NOT_STARTED = 19,
127
128 ///
129 /// The protocol has already been started.
130 ///
131 SHELL_ALREADY_STARTED = 20,
132
133 ///
134 /// The operation was aborted.
135 ///
136 SHELL_ABORTED = 21,
137
138 // note the skipping of 22, 23, and 24
139
140 ///
141 /// A function encountered an internal version that was
142 /// incompatible with a version requested by the caller.
143 ///
144 SHELL_INCOMPATIBLE_VERSION = 25,
145
146 ///
147 /// The function was not performed due to a security violation.
148 ///
149 SHELL_SECURITY_VIOLATION = 26,
150
151 ///
152 /// The function was performed and resulted in an unequal
153 /// comparison..
154 ///
155 SHELL_NOT_EQUAL = 27
156 }SHELL_STATUS;
157
158 #endif //__SHELL_BASE__