From 2b8ab3c4fd62375253c60f196d8d9c4234499746 Mon Sep 17 00:00:00 2001 From: Robert Moore Date: Thu, 25 Aug 2011 12:52:17 -0700 Subject: [PATCH] iASL: Fix to seek to zero on AML file for listings. Fixes a problem introduced in a previous commit to emit more file statistics for the iASL summary. The getfilesize function no longer leaves the file at offset 0, it preserves the current offset. Therefore, this patch fixes code that depended on that behavior. --- source/compiler/asllisting.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/source/compiler/asllisting.c b/source/compiler/asllisting.c index 29ae3089e..3ec7b1ba1 100644 --- a/source/compiler/asllisting.c +++ b/source/compiler/asllisting.c @@ -1381,6 +1381,7 @@ LsDoHexOutputC ( /* Get AML size, seek back to start */ AmlFileSize = FlGetFileSize (ASL_FILE_AML_OUTPUT); + FlSeekFile (ASL_FILE_AML_OUTPUT, 0); FlPrintFile (ASL_FILE_HEX_OUTPUT, " * C source code output\n"); FlPrintFile (ASL_FILE_HEX_OUTPUT, " * AML code block contains 0x%X bytes\n *\n */\n", @@ -1468,6 +1469,7 @@ LsDoHexOutputAsl ( /* Get AML size, seek back to start */ AmlFileSize = FlGetFileSize (ASL_FILE_AML_OUTPUT); + FlSeekFile (ASL_FILE_AML_OUTPUT, 0); FlPrintFile (ASL_FILE_HEX_OUTPUT, " * ASL source code output\n"); FlPrintFile (ASL_FILE_HEX_OUTPUT, " * AML code block contains 0x%X bytes\n *\n */\n", @@ -1555,6 +1557,7 @@ LsDoHexOutputAsm ( /* Get AML size, seek back to start */ AmlFileSize = FlGetFileSize (ASL_FILE_AML_OUTPUT); + FlSeekFile (ASL_FILE_AML_OUTPUT, 0); FlPrintFile (ASL_FILE_HEX_OUTPUT, "; Assembly code source output\n"); FlPrintFile (ASL_FILE_HEX_OUTPUT, "; AML code block contains 0x%X bytes\n;\n",