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