From 03864ce6153515a20b68fe711fb66c2f895de5c0 Mon Sep 17 00:00:00 2001 From: aystarik Date: Wed, 29 Jun 2005 16:08:13 +0000 Subject: [PATCH] Fix for ALIAS date 2002.10.21.21.49.00; author rmoore1; state Exp; --- source/compiler/aslopt.c | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/source/compiler/aslopt.c b/source/compiler/aslopt.c index c117e0396..cda8e7246 100644 --- a/source/compiler/aslopt.c +++ b/source/compiler/aslopt.c @@ -1,7 +1,7 @@ /****************************************************************************** * * Module Name: aslopt- Compiler optimizations - * $Revision: 1.5 $ + * $Revision: 1.6 $ * *****************************************************************************/ @@ -748,8 +748,20 @@ OptOptimizeNamePath ( if (Flags & AML_NAMED) { - Op->Asl.Child->Asl.Value.String = NewPath; - Op->Asl.Child->Asl.AmlLength = ACPI_STRLEN (NewPath); + if (Op->Asl.AmlOpcode == AML_ALIAS_OP) + { + /* + * ALIAS is the only oddball opcode, the name declaration + * (alias name) is the second operand + */ + Op->Asl.Child->Asl.Next->Asl.Value.String = NewPath; + Op->Asl.Child->Asl.Next->Asl.AmlLength = ACPI_STRLEN (NewPath); + } + else + { + Op->Asl.Child->Asl.Value.String = NewPath; + Op->Asl.Child->Asl.AmlLength = ACPI_STRLEN (NewPath); + } } else if (Flags & AML_CREATE) {