Fix to support method references without mistaking them for method

calls


date	2000.02.29.21.37.00;	author rmoore1;	state Exp;
This commit is contained in:
aystarik 2005-06-29 18:00:27 +00:00
parent d597474fb3
commit 12872f47ec

View File

@ -312,6 +312,8 @@ PsGetNextNamestring (
* Arg - Where the namepath will be stored
* ArgCount - If the namepath points to a control method,
* the method's argument is returned here.
* MethodCall - Whether the namepath can be the start
* of a method call
*
* RETURN: None
*
@ -327,7 +329,8 @@ void
PsGetNextNamepath (
ACPI_PARSE_STATE *ParserState,
ACPI_GENERIC_OP *Arg,
UINT32 *ArgCount)
UINT32 *ArgCount,
BOOLEAN MethodCall)
{
UINT8 *Path;
NAME_TABLE_ENTRY *Method = NULL;
@ -343,7 +346,8 @@ PsGetNextNamepath (
Path = PsGetNextNamestring (ParserState);
if (!Path)
/* if (!Path)*/
if (!Path || !MethodCall)
{
/* Null name case, create a null namepath object */
@ -359,7 +363,7 @@ PsGetNextNamepath (
* Lookup the name in the parsed namespace
*/
MethodOp = PsFind (PsGetParentScope (ParserState), Path, AML_MethodOp, 0);
MethodOp = MethodCall ? PsFind (PsGetParentScope (ParserState), Path, AML_MethodOp, 0):NULL;
if (MethodOp)
{
DEBUG_PRINT (TRACE_PARSE, ("PsGetNextNamepath: Found a method while parsed namespace still valid!\n"));
@ -733,7 +737,7 @@ PsGetNextArg (
Arg = PsAllocOp (AML_NAMEPATH);
if (Arg)
{
PsGetNextNamepath (ParserState, Arg, ArgCount);
PsGetNextNamepath (ParserState, Arg, ArgCount, 0);
}
}
@ -770,4 +774,4 @@ PsGetNextArg (
}
return_PTR (Arg);
}
}