summaryrefslogtreecommitdiffstats
path: root/sys/contrib/dev/acpica/compiler/aslfiles.c
diff options
context:
space:
mode:
authorjkim <jkim@FreeBSD.org>2010-07-06 20:57:28 +0000
committerjkim <jkim@FreeBSD.org>2010-07-06 20:57:28 +0000
commitee32cc37846fecf2cb4ccc3dbb6b5b016d146813 (patch)
treea1a1e6ac1daa6cd0de9bf90f7809c15a3f9bc326 /sys/contrib/dev/acpica/compiler/aslfiles.c
parenta3fd34d6553f34a17c1ec61d3694f885e251cf65 (diff)
parent9ef1b91c0f59a1a15565c354b3e372ab265c7b5a (diff)
downloadFreeBSD-src-ee32cc37846fecf2cb4ccc3dbb6b5b016d146813.zip
FreeBSD-src-ee32cc37846fecf2cb4ccc3dbb6b5b016d146813.tar.gz
Merge ACPICA 20100702.
Diffstat (limited to 'sys/contrib/dev/acpica/compiler/aslfiles.c')
-rw-r--r--sys/contrib/dev/acpica/compiler/aslfiles.c101
1 files changed, 50 insertions, 51 deletions
diff --git a/sys/contrib/dev/acpica/compiler/aslfiles.c b/sys/contrib/dev/acpica/compiler/aslfiles.c
index ca23834..3557b1f 100644
--- a/sys/contrib/dev/acpica/compiler/aslfiles.c
+++ b/sys/contrib/dev/acpica/compiler/aslfiles.c
@@ -122,12 +122,6 @@
/* Local prototypes */
-static void
-FlOpenFile (
- UINT32 FileId,
- char *Filename,
- char *Mode);
-
FILE *
FlOpenIncludeWithPrefix (
char *PrefixDir,
@@ -212,7 +206,7 @@ FlFileError (
*
******************************************************************************/
-static void
+void
FlOpenFile (
UINT32 FileId,
char *Filename,
@@ -774,6 +768,55 @@ FlOpenMiscOutputFiles (
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);
+ }
+
+ if (Gbl_FileType == ASL_INPUT_TYPE_ASCII_DATA)
+ {
+ return (AE_OK);
+ }
+
/* Create/Open a combined source output file */
Filename = FlGenerateFilename (FilenamePrefix, FILE_SUFFIX_SOURCE);
@@ -893,26 +936,6 @@ FlOpenMiscOutputFiles (
AslCompilerFileHeader (ASL_FILE_C_INCLUDE_OUTPUT);
}
- /* 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 a namespace output file if asked */
if (Gbl_NsOutputFlag)
@@ -933,30 +956,6 @@ FlOpenMiscOutputFiles (
AslCompilerFileHeader (ASL_FILE_NAMESPACE_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);
- }
-
return (AE_OK);
}
OpenPOWER on IntegriCloud