diff options
author | Jung-uk Kim <jkim@FreeBSD.org> | 2010-05-28 18:46:48 +0000 |
---|---|---|
committer | Jung-uk Kim <jkim@FreeBSD.org> | 2010-05-28 18:46:48 +0000 |
commit | f2bf96d30fe08965ffd53a28099131ac030e43d5 (patch) | |
tree | 2429d13f44367948f54b059645bd882e2e28f2d4 /compiler/aslcompile.c | |
parent | 5b663f0c698a9ecf7e562f7f7f730d056e499b5f (diff) |
Notes
Diffstat (limited to 'compiler/aslcompile.c')
-rw-r--r-- | compiler/aslcompile.c | 65 |
1 files changed, 24 insertions, 41 deletions
diff --git a/compiler/aslcompile.c b/compiler/aslcompile.c index d6cb8adc7387..56663b571247 100644 --- a/compiler/aslcompile.c +++ b/compiler/aslcompile.c @@ -127,10 +127,6 @@ static void CmFlushSourceCode ( void); -static ACPI_STATUS -FlCheckForAscii ( - ASL_FILE_INFO *FileInfo); - void FlConsumeAnsiComment ( ASL_FILE_INFO *FileInfo, @@ -433,7 +429,7 @@ FlConsumeNewComment ( * ******************************************************************************/ -static ACPI_STATUS +ACPI_STATUS FlCheckForAscii ( ASL_FILE_INFO *FileInfo) { @@ -543,31 +539,6 @@ CmDoCompile ( FullCompile = UtBeginEvent ("*** Total Compile time ***"); Event = UtBeginEvent ("Open input and output files"); - - /* Open the required input and output files */ - - Status = FlOpenInputFile (Gbl_Files[ASL_FILE_INPUT].Filename); - if (ACPI_FAILURE (Status)) - { - AePrintErrorLog (ASL_FILE_STDERR); - return -1; - } - - /* Check for 100% ASCII source file (comments are ignored) */ - - Status = FlCheckForAscii (&Gbl_Files[ASL_FILE_INPUT]); - if (ACPI_FAILURE (Status)) - { - AePrintErrorLog (ASL_FILE_STDERR); - return -1; - } - - Status = FlOpenMiscOutputFiles (Gbl_OutputFilenamePrefix); - if (ACPI_FAILURE (Status)) - { - AePrintErrorLog (ASL_FILE_STDERR); - return -1; - } UtEndEvent (Event); /* Build the parse tree */ @@ -888,19 +859,24 @@ CmCleanupAndExit ( if (Gbl_NsLookupCount) { - DbgPrint (ASL_DEBUG_OUTPUT, "\n\nMiscellaneous compile statistics\n\n"); - DbgPrint (ASL_DEBUG_OUTPUT, "%32s : %d\n", "Total Namespace searches", + DbgPrint (ASL_DEBUG_OUTPUT, + "\n\nMiscellaneous compile statistics\n\n"); + + DbgPrint (ASL_DEBUG_OUTPUT, + "%32s : %u\n", "Total Namespace searches", Gbl_NsLookupCount); - DbgPrint (ASL_DEBUG_OUTPUT, "%32s : %d usec\n", "Time per search", - ((UINT32) (AslGbl_Events[AslGbl_NamespaceEvent].EndTime - - AslGbl_Events[AslGbl_NamespaceEvent].StartTime) / - 10) / Gbl_NsLookupCount); - } + DbgPrint (ASL_DEBUG_OUTPUT, + "%32s : %u usec\n", "Time per search", ((UINT32) + (AslGbl_Events[AslGbl_NamespaceEvent].EndTime - + AslGbl_Events[AslGbl_NamespaceEvent].StartTime) / 10) / + Gbl_NsLookupCount); + } if (Gbl_ExceptionCount[ASL_ERROR] > ASL_MAX_ERROR_COUNT) { - printf ("\nMaximum error count (%d) exceeded\n", ASL_MAX_ERROR_COUNT); + printf ("\nMaximum error count (%u) exceeded\n", + ASL_MAX_ERROR_COUNT); } UtDisplaySummary (ASL_FILE_STDOUT); @@ -914,9 +890,15 @@ CmCleanupAndExit ( /* Delete AML file if there are errors */ - if ((Gbl_ExceptionCount[ASL_ERROR] > 0) && (!Gbl_IgnoreErrors)) + if ((Gbl_ExceptionCount[ASL_ERROR] > 0) && (!Gbl_IgnoreErrors) && + Gbl_Files[ASL_FILE_AML_OUTPUT].Handle) { - remove (Gbl_Files[ASL_FILE_AML_OUTPUT].Filename); + if (remove (Gbl_Files[ASL_FILE_AML_OUTPUT].Filename)) + { + printf ("%s: ", + Gbl_Files[ASL_FILE_AML_OUTPUT].Filename); + perror ("Could not delete AML file"); + } } /* @@ -928,8 +910,9 @@ CmCleanupAndExit ( { if (remove (Gbl_Files[ASL_FILE_SOURCE_OUTPUT].Filename)) { - printf ("Could not remove SRC file, %s\n", + printf ("%s: ", Gbl_Files[ASL_FILE_SOURCE_OUTPUT].Filename); + perror ("Could not delete SRC file"); } } } |