mirror of
https://github.com/acpica/acpica/
synced 2025-02-25 18:04:08 +03:00
Converter: refactor code to call CvFilenameExists only once.
Signed-off-by: Erik Schmauss <erik.schmauss@intel.com>
This commit is contained in:
parent
d2d2fa1ad2
commit
916c024136
@ -496,6 +496,7 @@ CvSwitchFiles(
|
||||
{
|
||||
char *Filename = Op->Common.CvFilename;
|
||||
ACPI_FILE_NODE *FNode;
|
||||
ACPI_FILE_NODE *Current;
|
||||
|
||||
CvDbgPrint ("Switching from %s to %s\n", AcpiGbl_CurrentFilename, Filename);
|
||||
FNode = CvFilenameExists (Filename, AcpiGbl_FileTreeRoot);
|
||||
@ -510,23 +511,23 @@ CvSwitchFiles(
|
||||
AslCommonError (ASL_ERROR, ASL_MSG_OPEN, 0, 0, 0, 0, NULL, MsgBuffer);
|
||||
AslAbort ();
|
||||
}
|
||||
Current = FNode;
|
||||
|
||||
/*
|
||||
* If the previous file is a descendent of the current file,
|
||||
* make sure that Include statements from the current file
|
||||
* to the previous have been emitted.
|
||||
*/
|
||||
while (FNode &&
|
||||
FNode->Parent &&
|
||||
AcpiUtStricmp (FNode->Filename, AcpiGbl_CurrentFilename))
|
||||
while (Current &&
|
||||
Current->Parent &&
|
||||
AcpiUtStricmp (Current->Filename, AcpiGbl_CurrentFilename))
|
||||
{
|
||||
CvPrintInclude (FNode, Level);
|
||||
FNode = FNode->Parent;
|
||||
Current = Current->Parent;
|
||||
}
|
||||
|
||||
/* Redirect output to the Op->Common.CvFilename */
|
||||
/* Redirect output to Op->Common.CvFilename */
|
||||
|
||||
FNode = CvFilenameExists (Filename, AcpiGbl_FileTreeRoot);
|
||||
AcpiOsRedirectOutput (FNode->File);
|
||||
AcpiGbl_CurrentFilename = FNode->Filename;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user