本文整理匯總了C++中AslCommonError函數的典型用法代碼示例。如果您正苦於以下問題:C++ AslCommonError函數的具體用法?C++ AslCommonError怎麽用?C++ AslCommonError使用的例子?那麽, 這裏精選的函數代碼示例或許可以為您提供幫助。
在下文中一共展示了AslCommonError函數的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C++代碼示例。
示例1: DtError
void
DtError (
UINT8 Level,
UINT16 MessageId,
DT_FIELD *FieldObject,
char *ExtraMessage)
{
/* Check if user wants to ignore this exception */
if (AslIsExceptionDisabled (Level, MessageId))
{
return;
}
if (FieldObject)
{
AslCommonError (Level, MessageId,
FieldObject->Line,
FieldObject->Line,
FieldObject->ByteOffset,
FieldObject->Column,
Gbl_Files[ASL_FILE_INPUT].Filename, ExtraMessage);
}
else
{
AslCommonError (Level, MessageId, 0,
0, 0, 0, 0, ExtraMessage);
}
}
示例2: AslCoreSubsystemError
void
AslCoreSubsystemError (
ACPI_PARSE_OBJECT *Op,
ACPI_STATUS Status,
char *ExtraMessage,
BOOLEAN Abort)
{
sprintf (MsgBuffer, "%s %s", AcpiFormatException (Status), ExtraMessage);
if (Op)
{
AslCommonError (ASL_ERROR, ASL_MSG_CORE_EXCEPTION, Op->Asl.LineNumber,
Op->Asl.LogicalLineNumber,
Op->Asl.LogicalByteOffset,
Op->Asl.Column,
Op->Asl.Filename, MsgBuffer);
}
else
{
AslCommonError (ASL_ERROR, ASL_MSG_CORE_EXCEPTION, 0,
0, 0, 0, NULL, MsgBuffer);
}
if (Abort)
{
AslAbort ();
}
}
示例3: AslError
void
AslError (
UINT8 Level,
UINT16 MessageId,
ACPI_PARSE_OBJECT *Op,
char *ExtraMessage)
{
/* Check if user wants to ignore this exception */
if (Gbl_AllExceptionsDisabled ||
AslIsExceptionDisabled (Level, MessageId))
{
return;
}
if (Op)
{
AslCommonError (Level, MessageId, Op->Asl.LineNumber,
Op->Asl.LogicalLineNumber,
Op->Asl.LogicalByteOffset,
Op->Asl.Column,
Op->Asl.Filename, ExtraMessage);
}
else
{
AslCommonError (Level, MessageId, 0,
0, 0, 0, NULL, ExtraMessage);
}
}
示例4: FlOpenAmlOutputFile
ACPI_STATUS
FlOpenAmlOutputFile (
char *FilenamePrefix)
{
char *Filename;
/* Output filename usually comes from the ASL itself */
Filename = Gbl_Files[ASL_FILE_AML_OUTPUT].Filename;
if (!Filename)
{
/* Create the output AML filename */
Filename = FlGenerateFilename (FilenamePrefix, FILE_SUFFIX_AML_CODE);
if (!Filename)
{
AslCommonError (ASL_ERROR, ASL_MSG_OUTPUT_FILENAME,
0, 0, 0, 0, NULL, NULL);
return (AE_ERROR);
}
}
/* Open the output AML file in binary mode */
FlOpenFile (ASL_FILE_AML_OUTPUT, Filename, "w+b");
return (AE_OK);
}
示例5: FlFileError
void
FlFileError (
UINT32 FileId,
UINT8 ErrorId)
{
snprintf (MsgBuffer, sizeof(MsgBuffer), "\"%s\" (%s) - %s", Gbl_Files[FileId].Filename,
Gbl_Files[FileId].Description, strerror (errno));
AslCommonError (ASL_ERROR, ErrorId, 0, 0, 0, 0, NULL, MsgBuffer);
}
示例6: FlFileError
void
FlFileError (
UINT32 FileId,
UINT8 ErrorId)
{
sprintf (MsgBuffer, "\"%s\" (%s)", Gbl_Files[FileId].Filename,
strerror (errno));
AslCommonError (ASL_ERROR, ErrorId, 0, 0, 0, 0, NULL, MsgBuffer);
}
示例7: FlFileError
void
FlFileError (
UINT32 FileId,
UINT8 ErrorId)
{
sprintf (AslGbl_MsgBuffer, "\"%s\" (%s) - %s", AslGbl_Files[FileId].Filename,
AslGbl_FileDescs[FileId].Description, strerror (errno));
AslCommonError (ASL_ERROR, ErrorId, 0, 0, 0, 0, NULL, AslGbl_MsgBuffer);
}
示例8: AslCompilererror
int
AslCompilererror (
char *CompilerMessage)
{
AslCommonError (ASL_ERROR, ASL_MSG_SYNTAX, Gbl_CurrentLineNumber,
Gbl_LogicalLineNumber, Gbl_CurrentLineOffset,
Gbl_CurrentColumn, Gbl_Files[ASL_FILE_INPUT].Filename,
CompilerMessage);
return 0;
}
示例9: DtNameError
void
DtNameError (
UINT8 Level,
UINT16 MessageId,
DT_FIELD *FieldObject,
char *ExtraMessage)
{
switch (Level)
{
case ASL_WARNING2:
case ASL_WARNING3:
if (Gbl_WarningLevel < Level)
{
return;
}
break;
default:
break;
}
if (FieldObject)
{
AslCommonError (Level, MessageId,
FieldObject->Line,
FieldObject->Line,
FieldObject->ByteOffset,
FieldObject->NameColumn,
Gbl_Files[ASL_FILE_INPUT].Filename, ExtraMessage);
}
else
{
AslCommonError (Level, MessageId, 0,
0, 0, 0, 0, ExtraMessage);
}
}
示例10: AslError
void
AslError (
UINT8 Level,
UINT8 MessageId,
ACPI_PARSE_OBJECT *Op,
char *ExtraMessage)
{
switch (Level)
{
case ASL_WARNING2:
case ASL_WARNING3:
if (Gbl_WarningLevel < Level)
{
return;
}
break;
default:
break;
}
if (Op)
{
AslCommonError (Level, MessageId, Op->Asl.LineNumber,
Op->Asl.LogicalLineNumber,
Op->Asl.LogicalByteOffset,
Op->Asl.Column,
Op->Asl.Filename, ExtraMessage);
}
else
{
AslCommonError (Level, MessageId, 0,
0, 0, 0, NULL, ExtraMessage);
}
}
示例11: FlOpenIncludeFile
void
FlOpenIncludeFile (
ACPI_PARSE_OBJECT *Op)
{
FILE *IncFile;
/* Op must be valid */
if (!Op)
{
AslCommonError (ASL_ERROR, ASL_MSG_INCLUDE_FILE_OPEN,
Gbl_CurrentLineNumber, Gbl_LogicalLineNumber,
Gbl_InputByteCount, Gbl_CurrentColumn,
Gbl_Files[ASL_FILE_INPUT].Filename, " - Null parse node");
return;
}
/*
* Flush out the "include ()" statement on this line, start
* the actual include file on the next line
*/
ResetCurrentLineBuffer ();
FlPrintFile (ASL_FILE_SOURCE_OUTPUT, "\n");
Gbl_CurrentLineOffset++;
/* Prepend the directory pathname and open the include file */
DbgPrint (ASL_PARSE_OUTPUT, "\nOpen include file: path %s\n\n",
Op->Asl.Value.String);
IncFile = FlOpenLocalFile (Op->Asl.Value.String, "r");
if (!IncFile)
{
sprintf (MsgBuffer, "%s (%s)", Op->Asl.Value.String, strerror (errno));
AslError (ASL_ERROR, ASL_MSG_INCLUDE_FILE_OPEN, Op, MsgBuffer);
return;
}
/* Push the include file on the open input file stack */
AslPushInputFileStack (IncFile, Op->Asl.Value.String);
}
示例12: UtLocalCalloc
void *
UtLocalCalloc (
UINT32 Size)
{
void *Allocated;
Allocated = ACPI_ALLOCATE_ZEROED (Size);
if (!Allocated)
{
AslCommonError (ASL_ERROR, ASL_MSG_MEMORY_ALLOCATION,
Gbl_CurrentLineNumber, Gbl_LogicalLineNumber,
Gbl_InputByteCount, Gbl_CurrentColumn,
Gbl_Files[ASL_FILE_INPUT].Filename, NULL);
CmCleanupAndExit ();
exit (1);
}
TotalAllocations++;
TotalAllocated += Size;
return (Allocated);
}
示例13: FlOpenMiscOutputFiles
ACPI_STATUS
FlOpenMiscOutputFiles (
char *FilenamePrefix)
{
char *Filename;
/* Create/Open a map file if requested */
if (AslGbl_MapfileFlag)
{
Filename = FlGenerateFilename (FilenamePrefix, FILE_SUFFIX_MAP);
if (!Filename)
{
AslCommonError (ASL_ERROR, ASL_MSG_LISTING_FILENAME,
0, 0, 0, 0, NULL, NULL);
return (AE_ERROR);
}
/* Open the hex file, text mode (closed at compiler exit) */
FlOpenFile (ASL_FILE_MAP_OUTPUT, Filename, "w+t");
AslCompilerSignon (ASL_FILE_MAP_OUTPUT);
AslCompilerFileHeader (ASL_FILE_MAP_OUTPUT);
}
/* All done for disassembler */
if (AslGbl_FileType == ASL_INPUT_TYPE_BINARY_ACPI_TABLE)
{
return (AE_OK);
}
/* Create/Open a hex output file if asked */
if (AslGbl_HexOutputFlag)
{
Filename = FlGenerateFilename (FilenamePrefix, FILE_SUFFIX_HEX_DUMP);
if (!Filename)
{
AslCommonError (ASL_ERROR, ASL_MSG_LISTING_FILENAME,
0, 0, 0, 0, NULL, NULL);
return (AE_ERROR);
}
/* Open the hex file, text mode */
FlOpenFile (ASL_FILE_HEX_OUTPUT, Filename, "w+t");
AslCompilerSignon (ASL_FILE_HEX_OUTPUT);
AslCompilerFileHeader (ASL_FILE_HEX_OUTPUT);
}
/* Create/Open a debug output file if asked */
if (AslGbl_DebugFlag)
{
Filename = FlGenerateFilename (FilenamePrefix, FILE_SUFFIX_DEBUG);
if (!Filename)
{
AslCommonError (ASL_ERROR, ASL_MSG_DEBUG_FILENAME,
0, 0, 0, 0, NULL, NULL);
return (AE_ERROR);
}
/* Open the debug file as STDERR, text mode */
AslGbl_Files[ASL_FILE_DEBUG_OUTPUT].Filename = Filename;
AslGbl_Files[ASL_FILE_DEBUG_OUTPUT].Handle =
freopen (Filename, "w+t", stderr);
if (!AslGbl_Files[ASL_FILE_DEBUG_OUTPUT].Handle)
{
/*
* A problem with freopen is that on error, we no longer
* have stderr and cannot emit normal error messages.
* Emit error to stdout, close files, and exit.
*/
fprintf (stdout,
"\nCould not open debug output file: %s\n\n", Filename);
CmCleanupAndExit ();
exit (1);
}
AslCompilerSignon (ASL_FILE_DEBUG_OUTPUT);
AslCompilerFileHeader (ASL_FILE_DEBUG_OUTPUT);
}
/* Create/Open a cross-reference output file if asked */
if (AslGbl_CrossReferenceOutput)
{
Filename = FlGenerateFilename (FilenamePrefix, FILE_SUFFIX_XREF);
if (!Filename)
{
AslCommonError (ASL_ERROR, ASL_MSG_DEBUG_FILENAME,
0, 0, 0, 0, NULL, NULL);
return (AE_ERROR);
//.........這裏部分代碼省略.........
示例14: FlOpenIncludeFile
void
FlOpenIncludeFile (
ACPI_PARSE_OBJECT *Op)
{
FILE *IncludeFile;
ASL_INCLUDE_DIR *NextDir;
/* Op must be valid */
if (!Op)
{
AslCommonError (ASL_ERROR, ASL_MSG_INCLUDE_FILE_OPEN,
AslGbl_CurrentLineNumber, AslGbl_LogicalLineNumber,
AslGbl_InputByteCount, AslGbl_CurrentColumn,
AslGbl_Files[ASL_FILE_INPUT].Filename, " - Null parse node");
return;
}
/*
* Flush out the "include ()" statement on this line, start
* the actual include file on the next line
*/
AslResetCurrentLineBuffer ();
FlPrintFile (ASL_FILE_SOURCE_OUTPUT, "\n");
AslGbl_CurrentLineOffset++;
/* Attempt to open the include file */
/* If the file specifies an absolute path, just open it */
if ((Op->Asl.Value.String[0] == '/') ||
(Op->Asl.Value.String[0] == '\\') ||
(Op->Asl.Value.String[1] == ':'))
{
IncludeFile = FlOpenIncludeWithPrefix ("", Op, Op->Asl.Value.String);
if (!IncludeFile)
{
goto ErrorExit;
}
return;
}
/*
* The include filename is not an absolute path.
*
* First, search for the file within the "local" directory -- meaning
* the same directory that contains the source file.
*
* Construct the file pathname from the global directory name.
*/
IncludeFile = FlOpenIncludeWithPrefix (
AslGbl_DirectoryPath, Op, Op->Asl.Value.String);
if (IncludeFile)
{
return;
}
/*
* Second, search for the file within the (possibly multiple) directories
* specified by the -I option on the command line.
*/
NextDir = AslGbl_IncludeDirList;
while (NextDir)
{
IncludeFile = FlOpenIncludeWithPrefix (
NextDir->Dir, Op, Op->Asl.Value.String);
if (IncludeFile)
{
return;
}
NextDir = NextDir->Next;
}
/* We could not open the include file after trying very hard */
ErrorExit:
sprintf (AslGbl_MsgBuffer, "%s, %s", Op->Asl.Value.String, strerror (errno));
AslError (ASL_ERROR, ASL_MSG_INCLUDE_FILE_OPEN, Op, AslGbl_MsgBuffer);
}
示例15: FlOpenMiscOutputFiles
ACPI_STATUS
FlOpenMiscOutputFiles (
char *FilenamePrefix)
{
char *Filename;
/* Create/Open a hex output file if asked */
if (Gbl_HexOutputFlag)
{
Filename = FlGenerateFilename (FilenamePrefix, FILE_SUFFIX_HEX_DUMP);
if (!Filename)
{
AslCommonError (ASL_ERROR, ASL_MSG_LISTING_FILENAME,
0, 0, 0, 0, NULL, NULL);
return (AE_ERROR);
}
/* Open the hex file, text mode */
FlOpenFile (ASL_FILE_HEX_OUTPUT, Filename, "w+");
AslCompilerSignon (ASL_FILE_HEX_OUTPUT);
AslCompilerFileHeader (ASL_FILE_HEX_OUTPUT);
}
/* Create/Open a debug output file if asked */
if (Gbl_DebugFlag)
{
Filename = FlGenerateFilename (FilenamePrefix, FILE_SUFFIX_DEBUG);
if (!Filename)
{
AslCommonError (ASL_ERROR, ASL_MSG_DEBUG_FILENAME,
0, 0, 0, 0, NULL, NULL);
return (AE_ERROR);
}
/* Open the debug file as STDERR, text mode */
/* TBD: hide this behind a FlReopenFile function */
Gbl_Files[ASL_FILE_DEBUG_OUTPUT].Filename = Filename;
Gbl_Files[ASL_FILE_DEBUG_OUTPUT].Handle =
freopen (Filename, "w+t", stderr);
AslCompilerSignon (ASL_FILE_DEBUG_OUTPUT);
AslCompilerFileHeader (ASL_FILE_DEBUG_OUTPUT);
}
/* Create/Open a listing output file if asked */
if (Gbl_ListingFlag)
{
Filename = FlGenerateFilename (FilenamePrefix, FILE_SUFFIX_LISTING);
if (!Filename)
{
AslCommonError (ASL_ERROR, ASL_MSG_LISTING_FILENAME,
0, 0, 0, 0, NULL, NULL);
return (AE_ERROR);
}
/* Open the listing file, text mode */
FlOpenFile (ASL_FILE_LISTING_OUTPUT, Filename, "w+");
AslCompilerSignon (ASL_FILE_LISTING_OUTPUT);
AslCompilerFileHeader (ASL_FILE_LISTING_OUTPUT);
}
if (Gbl_FileType == ASL_INPUT_TYPE_ASCII_DATA)
{
return (AE_OK);
}
/* Create/Open a combined source output file */
Filename = FlGenerateFilename (FilenamePrefix, FILE_SUFFIX_SOURCE);
if (!Filename)
{
AslCommonError (ASL_ERROR, ASL_MSG_LISTING_FILENAME,
0, 0, 0, 0, NULL, NULL);
return (AE_ERROR);
}
/*
* Open the source output file, binary mode (so that LF does not get
* expanded to CR/LF on some systems, messing up our seek
* calculations.)
*/
FlOpenFile (ASL_FILE_SOURCE_OUTPUT, Filename, "w+b");
/* Create/Open a assembly code source output file if asked */
if (Gbl_AsmOutputFlag)
{
Filename = FlGenerateFilename (FilenamePrefix, FILE_SUFFIX_ASM_SOURCE);
if (!Filename)
{
//.........這裏部分代碼省略.........