]>
Commit | Line | Data |
---|---|---|
1 | /*++\r | |
2 | \r | |
3 | Copyright (c) 2004, Intel Corporation \r | |
4 | All rights reserved. This program and the accompanying materials \r | |
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 | // Status codes returned by EFI utility programs and functions\r | |
29 | //\r | |
30 | #define STATUS_SUCCESS 0\r | |
31 | #define STATUS_WARNING 1\r | |
32 | #define STATUS_ERROR 2\r | |
33 | #define VOID void \r | |
34 | \r | |
35 | typedef int STATUS;\r | |
36 | \r | |
37 | #ifdef __cplusplus\r | |
38 | extern "C" {\r | |
39 | #endif\r | |
40 | //\r | |
41 | // When we call Error() or Warning(), the module keeps track of the worst\r | |
42 | // case reported. GetUtilityStatus() will get the worst-case results, which\r | |
43 | // can be used as the return value from the app.\r | |
44 | //\r | |
45 | STATUS\r | |
46 | GetUtilityStatus (\r | |
47 | void\r | |
48 | );\r | |
49 | \r | |
50 | //\r | |
51 | // If someone prints an error message and didn't specify a source file name,\r | |
52 | // then we print the utility name instead. However they must tell us the\r | |
53 | // utility name early on via this function.\r | |
54 | //\r | |
55 | void\r | |
56 | SetUtilityName (\r | |
57 | CHAR8 *ProgramName\r | |
58 | )\r | |
59 | ;\r | |
60 | \r | |
61 | void\r | |
62 | Error (\r | |
63 | CHAR8 *FileName,\r | |
64 | UINT32 LineNumber,\r | |
65 | UINT32 ErrorCode,\r | |
66 | CHAR8 *OffendingText,\r | |
67 | CHAR8 *MsgFmt,\r | |
68 | ...\r | |
69 | )\r | |
70 | ;\r | |
71 | \r | |
72 | void\r | |
73 | Warning (\r | |
74 | CHAR8 *FileName,\r | |
75 | UINT32 LineNumber,\r | |
76 | UINT32 ErrorCode,\r | |
77 | CHAR8 *OffendingText,\r | |
78 | CHAR8 *MsgFmt,\r | |
79 | ...\r | |
80 | )\r | |
81 | ;\r | |
82 | \r | |
83 | void\r | |
84 | DebugMsg (\r | |
85 | CHAR8 *FileName,\r | |
86 | UINT32 LineNumber,\r | |
87 | UINT32 MsgLevel,\r | |
88 | CHAR8 *OffendingText,\r | |
89 | CHAR8 *MsgFmt,\r | |
90 | ...\r | |
91 | )\r | |
92 | ;\r | |
93 | \r | |
94 | void\r | |
95 | SetDebugMsgMask (\r | |
96 | UINT32 MsgMask\r | |
97 | )\r | |
98 | ;\r | |
99 | \r | |
100 | void\r | |
101 | ParserSetPosition (\r | |
102 | CHAR8 *SourceFileName,\r | |
103 | UINT32 LineNum\r | |
104 | )\r | |
105 | ;\r | |
106 | \r | |
107 | void\r | |
108 | ParserError (\r | |
109 | UINT32 ErrorCode,\r | |
110 | CHAR8 *OffendingText,\r | |
111 | CHAR8 *MsgFmt,\r | |
112 | ...\r | |
113 | )\r | |
114 | ;\r | |
115 | \r | |
116 | void\r | |
117 | ParserWarning (\r | |
118 | UINT32 ErrorCode,\r | |
119 | CHAR8 *OffendingText,\r | |
120 | CHAR8 *MsgFmt,\r | |
121 | ...\r | |
122 | )\r | |
123 | ;\r | |
124 | \r | |
125 | void\r | |
126 | SetPrintLimits (\r | |
127 | UINT32 NumErrors,\r | |
128 | UINT32 NumWarnings,\r | |
129 | UINT32 NumWarningsPlusErrors\r | |
130 | )\r | |
131 | ;\r | |
132 | \r | |
133 | #ifdef __cplusplus\r | |
134 | }\r | |
135 | #endif\r | |
136 | \r | |
137 | #endif // #ifndef _EFI_UTILITY_MSGS_H_\r |