mirror of
https://github.com/acpica/acpica/
synced 2025-03-15 02:32:52 +03:00
Disassembler: Emit .DSL file size in summary.
Emit summary in the same format as the iASL compiler, including the disassembled file size.
This commit is contained in:
parent
76200cd189
commit
028796dce7
@ -147,6 +147,10 @@ LsSetupNsList (
|
||||
|
||||
/* Local prototypes */
|
||||
|
||||
static UINT32
|
||||
AdGetFileSize (
|
||||
FILE *File);
|
||||
|
||||
static void
|
||||
AdCreateTableHeader (
|
||||
char *Filename,
|
||||
@ -230,6 +234,38 @@ static ACPI_TABLE_DESC LocalTables[1];
|
||||
static ACPI_PARSE_OBJECT *AcpiGbl_ParseOpRoot;
|
||||
|
||||
|
||||
/*******************************************************************************
|
||||
*
|
||||
* FUNCTION: AdGetFileSize
|
||||
*
|
||||
* PARAMETERS: File - Open file handle
|
||||
*
|
||||
* RETURN: File Size
|
||||
*
|
||||
* DESCRIPTION: Get current file size. Uses seek-to-EOF. File must be open.
|
||||
*
|
||||
******************************************************************************/
|
||||
|
||||
static UINT32
|
||||
AdGetFileSize (
|
||||
FILE *File)
|
||||
{
|
||||
UINT32 FileSize;
|
||||
long Offset;
|
||||
|
||||
|
||||
Offset = ftell (File);
|
||||
|
||||
fseek (File, 0, SEEK_END);
|
||||
FileSize = (UINT32) ftell (File);
|
||||
|
||||
/* Restore file pointer */
|
||||
|
||||
fseek (File, Offset, SEEK_SET);
|
||||
return (FileSize);
|
||||
}
|
||||
|
||||
|
||||
/*******************************************************************************
|
||||
*
|
||||
* FUNCTION: AdInitialize
|
||||
@ -452,8 +488,10 @@ AdAmlDisassemble (
|
||||
"FieldName : FieldValue\n */\n\n");
|
||||
|
||||
AcpiDmDumpDataTable (Table);
|
||||
fprintf (stderr, "Acpi Data Table [%4.4s] decoded, written to \"%s\"\n",
|
||||
Table->Signature, DisasmFilename);
|
||||
fprintf (stderr, "Acpi Data Table [%4.4s] decoded\n",
|
||||
Table->Signature);
|
||||
fprintf (stderr, "Formatted output: %s - %u bytes\n",
|
||||
DisasmFilename, AdGetFileSize (File));
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -562,9 +600,9 @@ AdAmlDisassemble (
|
||||
if (AcpiGbl_DbOpt_disasm)
|
||||
{
|
||||
AdDisplayTables (Filename, Table);
|
||||
fprintf (stderr,
|
||||
"Disassembly completed, written to \"%s\"\n",
|
||||
DisasmFilename);
|
||||
fprintf (stderr, "Disassembly completed\n");
|
||||
fprintf (stderr, "ASL Output: %s - %u bytes\n",
|
||||
DisasmFilename, AdGetFileSize (File));
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user