Support for option to return error if name found in namespace

date	2000.12.15.16.28.00;	author rmoore1;	state Exp;
This commit is contained in:
aystarik 2005-06-29 18:33:43 +00:00
parent 73a5c13e64
commit 54fbb8b1b4

View File

@ -1,7 +1,7 @@
/*******************************************************************************
*
* Module Name: nssearch - Namespace search
* $Revision: 1.59 $
* $Revision: 1.62 $
*
******************************************************************************/
@ -9,8 +9,8 @@
*
* 1. Copyright Notice
*
* Some or all of this work - Copyright (c) 1999, Intel Corp. All rights
* reserved.
* Some or all of this work - Copyright (c) 1999, 2000, Intel Corp.
* All rights reserved.
*
* 2. License
*
@ -170,7 +170,7 @@ AcpiNsSearchNode (
("NsSearchNode: Searching %s [%p]\n",
ScopeName, Node));
DEBUG_PRINT (TRACE_NAMES,
("NsSearchNode: For %4.4s (type 0x%X)\n",
("NsSearchNode: For %4.4s (type %X)\n",
&TargetName, Type));
DEBUG_EXEC (AcpiCmFree (ScopeName));
}
@ -223,7 +223,7 @@ AcpiNsSearchNode (
}
DEBUG_PRINT (TRACE_NAMES,
("NsSearchNode: Name %4.4s (actual type 0x%X) found at %p\n",
("NsSearchNode: Name %4.4s (actual type %X) found at %p\n",
&TargetName, NextNode->Type, NextNode));
*ReturnNode = NextNode;
@ -251,7 +251,7 @@ AcpiNsSearchNode (
/* Searched entire table, not found */
DEBUG_PRINT (TRACE_NAMES,
("NsSearchNode: Name %4.4s (type 0x%X) not found at %p\n",
("NsSearchNode: Name %4.4s (type %X) not found at %p\n",
&TargetName, Type, NextNode));
@ -317,7 +317,7 @@ AcpiNsSearchParentTree (
if (AcpiNsLocal (Type))
{
DEBUG_PRINT (TRACE_NAMES,
("NsSearchParentTree: [%4.4s] (type 0x%X) is local (no search)\n",
("NsSearchParentTree: [%4.4s] (type %X) is local (no search)\n",
&TargetName, Type));
}
@ -439,6 +439,16 @@ AcpiNsSearchAndEnter (
Type, ReturnNode);
if (Status != AE_NOT_FOUND)
{
/*
* If we found it AND the request specifies that a
* find is an error, return the error
*/
if ((Status == AE_OK) &&
(Flags & NS_ERROR_IF_FOUND))
{
Status = AE_EXIST;
}
/*
* Either found it or there was an error
* -- finished either way