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