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