]> git.proxmox.com Git - mirror_edk2.git/blame - EdkCompatibilityPkg/Sample/Tools/Source/Common/EfiUtilityMsgs.h
Update the copyright notice format
[mirror_edk2.git] / EdkCompatibilityPkg / Sample / Tools / Source / Common / EfiUtilityMsgs.h
CommitLineData
3eb9473e 1/*++\r
2\r
4b1e1121
HT
3Copyright (c) 2004, Intel Corporation. All rights reserved.<BR>\r
4This program and the accompanying materials \r
3eb9473e 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//\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
33typedef int STATUS;\r
34\r
35#ifdef __cplusplus\r
36extern "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
43STATUS\r
44GetUtilityStatus (\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
53void\r
54SetUtilityName (\r
55 INT8 *ProgramName\r
e00e1d46 56 );\r
3eb9473e 57\r
58void\r
59Error (\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
68void\r
69Warning (\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
78void\r
79DebugMsg (\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
88void\r
89SetDebugMsgMask (\r
90 UINT32 MsgMask\r
e00e1d46 91 );\r
3eb9473e 92\r
93void\r
94ParserSetPosition (\r
95 INT8 *SourceFileName,\r
96 UINT32 LineNum\r
e00e1d46 97 );\r
3eb9473e 98\r
99void\r
100ParserError (\r
101 UINT32 ErrorCode,\r
102 INT8 *OffendingText,\r
103 INT8 *MsgFmt,\r
104 ...\r
e00e1d46 105 );\r
3eb9473e 106\r
107void\r
108ParserWarning (\r
109 UINT32 ErrorCode,\r
110 INT8 *OffendingText,\r
111 INT8 *MsgFmt,\r
112 ...\r
e00e1d46 113 );\r
3eb9473e 114\r
115void\r
116SetPrintLimits (\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