]>
Commit | Line | Data |
---|---|---|
30fdf114 LG |
1 | /** @file\r |
2 | \r | |
40d841f6 LG |
3 | Copyright (c) 2004 - 2008, Intel Corporation. All rights reserved.<BR>\r |
4 | This program and the accompanying materials \r | |
30fdf114 LG |
5 | are licensed and made available under the terms and conditions of the BSD License \r |
6 | which accompanies this distribution. The full text of the license may be found at \r | |
7 | http://opensource.org/licenses/bsd-license.php \r | |
8 | \r | |
9 | THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, \r | |
10 | WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. \r | |
11 | \r | |
12 | Module Name:\r | |
13 | \r | |
14 | EfiUtilityMsgs.h\r | |
15 | \r | |
16 | Abstract:\r | |
17 | \r | |
18 | Defines and prototypes for common EFI utility error and debug messages.\r | |
19 | \r | |
20 | **/\r | |
21 | \r | |
22 | #ifndef _EFI_UTILITY_MSGS_H_\r | |
23 | #define _EFI_UTILITY_MSGS_H_\r | |
24 | \r | |
25 | #include <Common/UefiBaseTypes.h>\r | |
26 | \r | |
27 | //\r | |
28 | // Log message print Level\r | |
29 | //\r | |
30 | #define VERBOSE_LOG_LEVEL 15\r | |
31 | #define WARNING_LOG_LEVEL 15\r | |
32 | #define INFO_LOG_LEVEL 20\r | |
33 | #define KEY_LOG_LEVEL 40\r | |
34 | #define ERROR_LOG_LEVLE 50\r | |
35 | \r | |
36 | //\r | |
37 | // Status codes returned by EFI utility programs and functions\r | |
38 | //\r | |
39 | #define STATUS_SUCCESS 0\r | |
40 | #define STATUS_WARNING 1\r | |
41 | #define STATUS_ERROR 2\r | |
42 | #define VOID void \r | |
43 | \r | |
44 | typedef int STATUS;\r | |
45 | \r | |
46 | #define MAX_LINE_LEN 0x200\r | |
47 | #define MAXIMUM_INPUT_FILE_NUM 10\r | |
48 | \r | |
49 | #ifdef __cplusplus\r | |
50 | extern "C" {\r | |
51 | #endif\r | |
52 | //\r | |
53 | // When we call Error() or Warning(), the module keeps track of the worst\r | |
54 | // case reported. GetUtilityStatus() will get the worst-case results, which\r | |
55 | // can be used as the return value from the app.\r | |
56 | //\r | |
57 | STATUS\r | |
58 | GetUtilityStatus (\r | |
59 | VOID\r | |
60 | );\r | |
61 | \r | |
62 | //\r | |
63 | // If someone prints an error message and didn't specify a source file name,\r | |
64 | // then we print the utility name instead. However they must tell us the\r | |
65 | // utility name early on via this function.\r | |
66 | //\r | |
67 | VOID\r | |
68 | SetUtilityName (\r | |
69 | CHAR8 *ProgramName\r | |
70 | )\r | |
71 | ;\r | |
72 | \r | |
52302d4d LG |
73 | VOID\r |
74 | PrintMessage (\r | |
75 | CHAR8 *Type,\r | |
76 | CHAR8 *FileName,\r | |
77 | UINT32 LineNumber,\r | |
78 | UINT32 MessageCode,\r | |
79 | CHAR8 *Text,\r | |
80 | CHAR8 *MsgFmt,\r | |
81 | va_list List\r | |
82 | );\r | |
83 | \r | |
30fdf114 LG |
84 | VOID\r |
85 | Error (\r | |
86 | CHAR8 *FileName,\r | |
87 | UINT32 LineNumber,\r | |
88 | UINT32 ErrorCode,\r | |
89 | CHAR8 *OffendingText,\r | |
90 | CHAR8 *MsgFmt,\r | |
91 | ...\r | |
92 | )\r | |
93 | ;\r | |
94 | \r | |
95 | VOID\r | |
96 | Warning (\r | |
97 | CHAR8 *FileName,\r | |
98 | UINT32 LineNumber,\r | |
99 | UINT32 WarningCode,\r | |
100 | CHAR8 *OffendingText,\r | |
101 | CHAR8 *MsgFmt,\r | |
102 | ...\r | |
103 | )\r | |
104 | ;\r | |
105 | \r | |
106 | VOID\r | |
107 | DebugMsg (\r | |
108 | CHAR8 *FileName,\r | |
109 | UINT32 LineNumber,\r | |
fd171542 | 110 | UINT64 MsgLevel,\r |
30fdf114 LG |
111 | CHAR8 *OffendingText,\r |
112 | CHAR8 *MsgFmt,\r | |
113 | ...\r | |
114 | )\r | |
115 | ;\r | |
116 | \r | |
117 | VOID\r | |
118 | VerboseMsg (\r | |
119 | CHAR8 *MsgFmt,\r | |
120 | ...\r | |
121 | );\r | |
122 | \r | |
123 | VOID\r | |
124 | NormalMsg (\r | |
125 | CHAR8 *MsgFmt,\r | |
126 | ...\r | |
127 | );\r | |
128 | \r | |
129 | VOID\r | |
130 | KeyMsg (\r | |
131 | CHAR8 *MsgFmt,\r | |
132 | ...\r | |
133 | );\r | |
134 | \r | |
135 | VOID\r | |
136 | SetPrintLevel (\r | |
fd171542 | 137 | UINT64 LogLevel\r |
30fdf114 LG |
138 | );\r |
139 | \r | |
140 | VOID\r | |
141 | ParserSetPosition (\r | |
142 | CHAR8 *SourceFileName,\r | |
143 | UINT32 LineNum\r | |
144 | )\r | |
145 | ;\r | |
146 | \r | |
147 | VOID\r | |
148 | ParserError (\r | |
149 | UINT32 ErrorCode,\r | |
150 | CHAR8 *OffendingText,\r | |
151 | CHAR8 *MsgFmt,\r | |
152 | ...\r | |
153 | )\r | |
154 | ;\r | |
155 | \r | |
156 | VOID\r | |
157 | ParserWarning (\r | |
158 | UINT32 ErrorCode,\r | |
159 | CHAR8 *OffendingText,\r | |
160 | CHAR8 *MsgFmt,\r | |
161 | ...\r | |
162 | )\r | |
163 | ;\r | |
164 | \r | |
165 | VOID\r | |
166 | SetPrintLimits (\r | |
167 | UINT32 NumErrors,\r | |
168 | UINT32 NumWarnings,\r | |
169 | UINT32 NumWarningsPlusErrors\r | |
170 | )\r | |
171 | ;\r | |
172 | \r | |
173 | #ifdef __cplusplus\r | |
174 | }\r | |
175 | #endif\r | |
176 | \r | |
177 | #endif // #ifndef _EFI_UTILITY_MSGS_H_\r |