diff options
author | jkim <jkim@FreeBSD.org> | 2012-11-14 22:20:16 +0000 |
---|---|---|
committer | jkim <jkim@FreeBSD.org> | 2012-11-14 22:20:16 +0000 |
commit | 526bfcf905004d9b67338a445cb661a63c3de018 (patch) | |
tree | 2ffc551e57f0545a17c165d729c1438a26236f60 /source/compiler/asllisting.c | |
parent | d8cd02b5b5893df382c08566087e32fe5b0c3abb (diff) | |
download | FreeBSD-src-526bfcf905004d9b67338a445cb661a63c3de018.zip FreeBSD-src-526bfcf905004d9b67338a445cb661a63c3de018.tar.gz |
Import ACPICA 20121114.
Diffstat (limited to 'source/compiler/asllisting.c')
-rw-r--r-- | source/compiler/asllisting.c | 45 |
1 files changed, 39 insertions, 6 deletions
diff --git a/source/compiler/asllisting.c b/source/compiler/asllisting.c index 339cc01..b70bcf8 100644 --- a/source/compiler/asllisting.c +++ b/source/compiler/asllisting.c @@ -135,6 +135,10 @@ LsTreeWriteWalk ( UINT32 Level, void *Context); +static UINT32 +LsReadAmlOutputFile ( + UINT8 *Buffer); + /******************************************************************************* * @@ -1282,6 +1286,38 @@ LsDoHexOutput ( /******************************************************************************* * + * FUNCTION: LsReadAmlOutputFile + * + * PARAMETERS: Buffer - Where to return data + * + * RETURN: None. + * + * DESCRIPTION: Read a line of the AML output prior to formatting the data + * + ******************************************************************************/ + +static UINT32 +LsReadAmlOutputFile ( + UINT8 *Buffer) +{ + UINT32 Actual; + + + Actual = fread (Buffer, 1, HEX_TABLE_LINE_SIZE, + Gbl_Files[ASL_FILE_AML_OUTPUT].Handle); + + if (ferror (Gbl_Files[ASL_FILE_AML_OUTPUT].Handle)) + { + FlFileError (ASL_FILE_AML_OUTPUT, ASL_MSG_READ); + AslAbort (); + } + + return (Actual); +} + + +/******************************************************************************* + * * FUNCTION: LsDoHexOutputC * * PARAMETERS: None @@ -1319,8 +1355,7 @@ LsDoHexOutputC ( { /* Read enough bytes needed for one output line */ - LineLength = fread (FileData, 1, HEX_TABLE_LINE_SIZE, - Gbl_Files[ASL_FILE_AML_OUTPUT].Handle); + LineLength = LsReadAmlOutputFile (FileData); if (!LineLength) { break; @@ -1407,8 +1442,7 @@ LsDoHexOutputAsl ( { /* Read enough bytes needed for one output line */ - LineLength = fread (FileData, 1, HEX_TABLE_LINE_SIZE, - Gbl_Files[ASL_FILE_AML_OUTPUT].Handle); + LineLength = LsReadAmlOutputFile (FileData); if (!LineLength) { break; @@ -1494,8 +1528,7 @@ LsDoHexOutputAsm ( { /* Read enough bytes needed for one output line */ - LineLength = fread (FileData, 1, HEX_TABLE_LINE_SIZE, - Gbl_Files[ASL_FILE_AML_OUTPUT].Handle); + LineLength = LsReadAmlOutputFile (FileData); if (!LineLength) { break; |