lib/acpica/source/common/adisasm.c
/******************************************************************************
 *
 * FUNCTION:    AdDoExternalFileList
 *
 * PARAMETERS:  Filename            - Input file for the table
 *
 * RETURN:      Status
 *
 * DESCRIPTION: Process all tables found in the -e external files list
 *
 *****************************************************************************/
AdDoExternalFileList
PARAMETERS:  Filename            - Input file for the table

Status

Process all tables found in the -e external files list
AdDoExternalFileList PARAMETERS : Filename - Input file for the table Status Process all tables found in the - e external files list
static ACPI_STATUS
AdDoExternalFileList (
    char                    *Filename)
{
    ACPI_EXTERNAL_FILE      *ExternalFileList;
    char                    *ExternalFilename;
    ACPI_NEW_TABLE_DESC     *ExternalListHead = NULL;
    ACPI_STATUS             Status;
    ACPI_STATUS             GlobalStatus = AE_OK;
    ACPI_OWNER_ID           OwnerId;
    ExternalFileList = AcpiGbl_ExternalFileList;
    while (ExternalFileList)
    {
        ExternalFilename = ExternalFileList->Path;
        if (!strcmp (ExternalFilename, Filename))
        {
            ExternalFileList = ExternalFileList->Next;
            continue;
        }
        AcpiOsPrintf ("External object resolution file %16s\n",
            ExternalFilename);
        Status = AcGetAllTablesFromFile (
            ExternalFilename, ACPI_GET_ONLY_AML_TABLES, &ExternalListHead);
        if (ACPI_FAILURE (Status))
        {
            if (Status == AE_TYPE)
            {
                ExternalFileList = ExternalFileList->Next;
                GlobalStatus = AE_TYPE;
                Status = AE_OK;
                continue;
            }
            return (Status);
        }
        while (ExternalListHead)
        {
            Status = AdParseTable (
                ExternalListHead->Table, &OwnerId, TRUE, TRUE);
            if (ACPI_FAILURE (Status))
            {
                AcpiOsPrintf ("Could not parse external ACPI tables, %s\n",
                    AcpiFormatException (Status));
                return (Status);
            }
            AcpiDmFinishNamespaceLoad (AcpiGbl_ParseOpRoot,
                AcpiGbl_RootNode, OwnerId);
            AcpiPsDeleteParseTree (AcpiGbl_ParseOpRoot);
            ExternalListHead = ExternalListHead->Next;
        }
        ExternalFileList = ExternalFileList->Next;
    }
    if (ACPI_FAILURE (GlobalStatus))
    {
        return (GlobalStatus);
    }
    if (AcpiGbl_ExternalFileList)
    {
        AcpiDmClearExternalList ();
    }
    AcpiDmGetExternalsFromFile ();
    return (AE_OK);
}
static ACPI_STATUS AdDoExternalFileList ( char * Filename ) { ACPI_EXTERNAL_FILE * ExternalFileList ; char * ExternalFilename ; ACPI_NEW_TABLE_DESC * ExternalListHead = NULL ; ACPI_STATUS Status ; ACPI_STATUS GlobalStatus = AE_OK ; ACPI_OWNER_ID OwnerId ; ExternalFileList = AcpiGbl_ExternalFileList ; while ( ExternalFileList ) { ExternalFilename = ExternalFileList -> Path ; if ( ! strcmp ( ExternalFilename , Filename ) ) { ExternalFileList = ExternalFileList -> Next ; continue ; } AcpiOsPrintf ( " \n " , ExternalFilename ) ; Status = AcGetAllTablesFromFile ( ExternalFilename , ACPI_GET_ONLY_AML_TABLES , & ExternalListHead ) ; if ( ACPI_FAILURE ( Status ) ) { if ( Status == AE_TYPE ) { ExternalFileList = ExternalFileList -> Next ; GlobalStatus = AE_TYPE ; Status = AE_OK ; continue ; } return ( Status ) ; } while ( ExternalListHead ) { Status = AdParseTable ( ExternalListHead -> Table , & OwnerId , TRUE , TRUE ) ; if ( ACPI_FAILURE ( Status ) ) { AcpiOsPrintf ( " \n " , AcpiFormatException ( Status ) ) ; return ( Status ) ; } AcpiDmFinishNamespaceLoad ( AcpiGbl_ParseOpRoot , AcpiGbl_RootNode , OwnerId ) ; AcpiPsDeleteParseTree ( AcpiGbl_ParseOpRoot ) ; ExternalListHead = ExternalListHead -> Next ; } ExternalFileList = ExternalFileList -> Next ; } if ( ACPI_FAILURE ( GlobalStatus ) ) { return ( GlobalStatus ) ; } if ( AcpiGbl_ExternalFileList ) { AcpiDmClearExternalList ( ) ; } AcpiDmGetExternalsFromFile ( ) ; return ( AE_OK ) ; }
FUNCTION:    AdDoExternalFileList
 PARAMETERS:  Filename            - Input file for the table
FUNCTION : AdDoExternalFileList PARAMETERS : Filename - Input file for the table
/*
     * External filenames are specified on the command line like this:
     * Example: iasl -e file1,file2,file3 -d xxx.aml
     */ /* Process each external file */ /* Next external file */ /* Load external tables for symbol resolution */ /*
             * Load namespace from names created within control methods
             * Set owner id of nodes in external table
             */ /* Next external file */ /* Clear external list generated by Scope in external tables */ /* Load any externals defined in the optional external ref file */