void LsCheckException ( UINT32 LineNumber, UINT32 FileId) { if ((!Gbl_NextError) || (LineNumber < Gbl_NextError->LogicalLineNumber )) { return; } /* Handle multiple errors per line */ if (FileId == ASL_FILE_LISTING_OUTPUT) { while (Gbl_NextError && (LineNumber >= Gbl_NextError->LogicalLineNumber)) { AePrintException (FileId, Gbl_NextError, "\n[****iasl****]\n"); Gbl_NextError = Gbl_NextError->Next; } FlPrintFile (FileId, "\n"); } }
void AePrintErrorLog ( UINT32 FileId) { ASL_ERROR_MSG *Enode = Gbl_ErrorLog; /* Walk the error node list */ while (Enode) { AePrintException (FileId, Enode, NULL); Enode = Enode->Next; } }
void AslCommonError ( UINT8 Level, UINT16 MessageId, UINT32 CurrentLineNumber, UINT32 LogicalLineNumber, UINT32 LogicalByteOffset, UINT32 Column, char *Filename, char *ExtraMessage) { char *MessageBuffer = NULL; ASL_ERROR_MSG *Enode; Enode = UtLocalCalloc (sizeof (ASL_ERROR_MSG)); if (ExtraMessage) { /* Allocate a buffer for the message and a new error node */ MessageBuffer = UtLocalCalloc (strlen (ExtraMessage) + 1); /* Keep a copy of the extra message */ ACPI_STRCPY (MessageBuffer, ExtraMessage); } /* Initialize the error node */ if (Filename) { Enode->Filename = Filename; Enode->FilenameLength = strlen (Filename); if (Enode->FilenameLength < 6) { Enode->FilenameLength = 6; } } Enode->MessageId = MessageId; Enode->Level = Level; Enode->LineNumber = CurrentLineNumber; Enode->LogicalLineNumber = LogicalLineNumber; Enode->LogicalByteOffset = LogicalByteOffset; Enode->Column = Column; Enode->Message = MessageBuffer; Enode->SourceLine = NULL; /* Add the new node to the error node list */ AeAddToErrorLog (Enode); if (Gbl_DebugFlag) { /* stderr is a file, send error to it immediately */ AePrintException (ASL_FILE_STDERR, Enode, NULL); } Gbl_ExceptionCount[Level]++; if (Gbl_ExceptionCount[ASL_ERROR] > ASL_MAX_ERROR_COUNT) { printf ("\nMaximum error count (%u) exceeded\n", ASL_MAX_ERROR_COUNT); Gbl_SourceLine = 0; Gbl_NextError = Gbl_ErrorLog; CmCleanupAndExit (); exit(1); } return; }
void AslCommonError2 ( UINT8 Level, UINT16 MessageId, UINT32 LineNumber, UINT32 Column, char *SourceLine, char *Filename, char *ExtraMessage) { char *MessageBuffer = NULL; char *LineBuffer; ASL_ERROR_MSG *Enode; Enode = UtLocalCalloc (sizeof (ASL_ERROR_MSG)); if (ExtraMessage) { /* Allocate a buffer for the message and a new error node */ MessageBuffer = UtLocalCalloc (strlen (ExtraMessage) + 1); /* Keep a copy of the extra message */ ACPI_STRCPY (MessageBuffer, ExtraMessage); } LineBuffer = UtLocalCalloc (strlen (SourceLine) + 1); ACPI_STRCPY (LineBuffer, SourceLine); /* Initialize the error node */ if (Filename) { Enode->Filename = Filename; Enode->FilenameLength = strlen (Filename); if (Enode->FilenameLength < 6) { Enode->FilenameLength = 6; } } Enode->MessageId = MessageId; Enode->Level = Level; Enode->LineNumber = LineNumber; Enode->LogicalLineNumber = LineNumber; Enode->LogicalByteOffset = 0; Enode->Column = Column; Enode->Message = MessageBuffer; Enode->SourceLine = LineBuffer; /* Add the new node to the error node list */ AeAddToErrorLog (Enode); if (Gbl_DebugFlag) { /* stderr is a file, send error to it immediately */ AePrintException (ASL_FILE_STDERR, Enode, NULL); } Gbl_ExceptionCount[Level]++; }