summaryrefslogtreecommitdiffstats
path: root/sys/contrib/dev/acpica/compiler/aslfiles.c
diff options
context:
space:
mode:
authorjkim <jkim@FreeBSD.org>2012-11-20 21:01:59 +0000
committerjkim <jkim@FreeBSD.org>2012-11-20 21:01:59 +0000
commit3fd80a82666158c3a0cc79d8aeeecb24bd186c3a (patch)
treefa7a75101aa590769412545429cb755ccbff57f4 /sys/contrib/dev/acpica/compiler/aslfiles.c
parent3c42bc6af3ec177b17f3bf185bf4a3c8ea62edcf (diff)
parent526bfcf905004d9b67338a445cb661a63c3de018 (diff)
downloadFreeBSD-src-3fd80a82666158c3a0cc79d8aeeecb24bd186c3a.zip
FreeBSD-src-3fd80a82666158c3a0cc79d8aeeecb24bd186c3a.tar.gz
Merge ACPICA 20121114.
Diffstat (limited to 'sys/contrib/dev/acpica/compiler/aslfiles.c')
-rw-r--r--sys/contrib/dev/acpica/compiler/aslfiles.c26
1 files changed, 13 insertions, 13 deletions
diff --git a/sys/contrib/dev/acpica/compiler/aslfiles.c b/sys/contrib/dev/acpica/compiler/aslfiles.c
index 19b6980..39f64b7 100644
--- a/sys/contrib/dev/acpica/compiler/aslfiles.c
+++ b/sys/contrib/dev/acpica/compiler/aslfiles.c
@@ -143,15 +143,14 @@ FlOpenFile (
File = fopen (Filename, Mode);
-
- Gbl_Files[FileId].Filename = Filename;
- Gbl_Files[FileId].Handle = File;
-
if (!File)
{
FlFileError (FileId, ASL_MSG_OPEN);
AslAbort ();
}
+
+ Gbl_Files[FileId].Filename = Filename;
+ Gbl_Files[FileId].Handle = File;
}
@@ -216,7 +215,7 @@ FlReadFile (
/* Read and check for error */
Actual = fread (Buffer, 1, Length, Gbl_Files[FileId].Handle);
- if (Actual != Length)
+ if (Actual < Length)
{
if (feof (Gbl_Files[FileId].Handle))
{
@@ -659,16 +658,17 @@ FlOpenIncludeWithPrefix (
/* Attempt to open the file, push if successful */
IncludeFile = fopen (Pathname, "r");
- if (IncludeFile)
+ if (!IncludeFile)
{
- /* Push the include file on the open input file stack */
-
- AslPushInputFileStack (IncludeFile, Pathname);
- return (IncludeFile);
+ fprintf (stderr, "Could not open include file %s\n", Pathname);
+ ACPI_FREE (Pathname);
+ return (NULL);
}
- ACPI_FREE (Pathname);
- return (NULL);
+ /* Push the include file on the open input file stack */
+
+ AslPushInputFileStack (IncludeFile, Pathname);
+ return (IncludeFile);
}
@@ -952,7 +952,7 @@ FlOpenMiscOutputFiles (
return (AE_OK);
}
- /* Create/Open a combined source output file */
+ /* Create/Open a combined source output file */
Filename = FlGenerateFilename (FilenamePrefix, FILE_SUFFIX_SOURCE);
if (!Filename)
OpenPOWER on IntegriCloud