]> git.proxmox.com Git - mirror_edk2.git/blame - BaseTools/Source/C/Common/EfiUtilityMsgs.h
Sync basetools' source and binary files with r1707 of the basetools project.
[mirror_edk2.git] / BaseTools / Source / C / Common / EfiUtilityMsgs.h
CommitLineData
30fdf114
LG
1/** @file\r
2\r
3Copyright (c) 2004 - 2008, Intel Corporation \r
4All rights reserved. This program and the accompanying materials \r
5are licensed and made available under the terms and conditions of the BSD License \r
6which accompanies this distribution. The full text of the license may be found at \r
7http://opensource.org/licenses/bsd-license.php \r
8 \r
9THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, \r
10WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. \r
11\r
12Module Name:\r
13\r
14 EfiUtilityMsgs.h\r
15\r
16Abstract:\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
44typedef 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
50extern "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
57STATUS\r
58GetUtilityStatus (\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
67VOID\r
68SetUtilityName (\r
69 CHAR8 *ProgramName\r
70 )\r
71;\r
72\r
73VOID\r
74Error (\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
84VOID\r
85Warning (\r
86 CHAR8 *FileName,\r
87 UINT32 LineNumber,\r
88 UINT32 WarningCode,\r
89 CHAR8 *OffendingText,\r
90 CHAR8 *MsgFmt,\r
91 ...\r
92 )\r
93;\r
94\r
95VOID\r
96DebugMsg (\r
97 CHAR8 *FileName,\r
98 UINT32 LineNumber,\r
fd171542 99 UINT64 MsgLevel,\r
30fdf114
LG
100 CHAR8 *OffendingText,\r
101 CHAR8 *MsgFmt,\r
102 ...\r
103 )\r
104;\r
105\r
106VOID\r
107VerboseMsg (\r
108 CHAR8 *MsgFmt,\r
109 ...\r
110 );\r
111\r
112VOID\r
113NormalMsg (\r
114 CHAR8 *MsgFmt,\r
115 ...\r
116 );\r
117\r
118VOID\r
119KeyMsg (\r
120 CHAR8 *MsgFmt,\r
121 ...\r
122 );\r
123\r
124VOID\r
125SetPrintLevel (\r
fd171542 126 UINT64 LogLevel\r
30fdf114
LG
127 );\r
128\r
129VOID\r
130ParserSetPosition (\r
131 CHAR8 *SourceFileName,\r
132 UINT32 LineNum\r
133 )\r
134;\r
135\r
136VOID\r
137ParserError (\r
138 UINT32 ErrorCode,\r
139 CHAR8 *OffendingText,\r
140 CHAR8 *MsgFmt,\r
141 ...\r
142 )\r
143;\r
144\r
145VOID\r
146ParserWarning (\r
147 UINT32 ErrorCode,\r
148 CHAR8 *OffendingText,\r
149 CHAR8 *MsgFmt,\r
150 ...\r
151 )\r
152;\r
153\r
154VOID\r
155SetPrintLimits (\r
156 UINT32 NumErrors,\r
157 UINT32 NumWarnings,\r
158 UINT32 NumWarningsPlusErrors\r
159 )\r
160;\r
161\r
162#ifdef __cplusplus\r
163}\r
164#endif\r
165\r
166#endif // #ifndef _EFI_UTILITY_MSGS_H_\r