ReactOS Fundraising Campaign 2012
 
€ 4,410 / € 30,000

Information | Donate

Home | Info | Community | Development | myReactOS | Contact Us

  1. Home
  2. Community
  3. Development
  4. myReactOS
  5. Fundraiser 2012

  1. Main Page
  2. Alphabetical List
  3. Data Structures
  4. Directories
  5. File List
  6. Data Fields
  7. Globals
  8. Related Pages

ReactOS Development > Doxygen

static ACPI_STATUS AcpiNsSearchParentTree ( UINT32  TargetName,
ACPI_NAMESPACE_NODE Node,
ACPI_OBJECT_TYPE  Type,
ACPI_NAMESPACE_NODE **  ReturnNode 
) [static]

Definition at line 275 of file nssearch.c.

Referenced by AcpiNsSearchAndEnter().

{
    ACPI_STATUS             Status;
    ACPI_NAMESPACE_NODE     *ParentNode;


    ACPI_FUNCTION_TRACE (NsSearchParentTree);


    ParentNode = Node->Parent;

    /*
     * If there is no parent (i.e., we are at the root) or type is "local",
     * we won't be searching the parent tree.
     */
    if (!ParentNode)
    {
        ACPI_DEBUG_PRINT ((ACPI_DB_NAMES, "[%4.4s] has no parent\n",
            ACPI_CAST_PTR (char, &TargetName)));
        return_ACPI_STATUS (AE_NOT_FOUND);
    }

    if (AcpiNsLocal (Type))
    {
        ACPI_DEBUG_PRINT ((ACPI_DB_NAMES,
            "[%4.4s] type [%s] must be local to this scope (no parent search)\n",
            ACPI_CAST_PTR (char, &TargetName), AcpiUtGetTypeName (Type)));
        return_ACPI_STATUS (AE_NOT_FOUND);
    }

    /* Search the parent tree */

    ACPI_DEBUG_PRINT ((ACPI_DB_NAMES,
        "Searching parent [%4.4s] for [%4.4s]\n",
        AcpiUtGetNodeName (ParentNode), ACPI_CAST_PTR (char, &TargetName)));

    /* Search parents until target is found or we have backed up to the root */

    while (ParentNode)
    {
        /*
         * Search parent scope. Use TYPE_ANY because we don't care about the
         * object type at this point, we only care about the existence of
         * the actual name we are searching for. Typechecking comes later.
         */
        Status = AcpiNsSearchOneScope (
                    TargetName, ParentNode, ACPI_TYPE_ANY, ReturnNode);
        if (ACPI_SUCCESS (Status))
        {
            return_ACPI_STATUS (Status);
        }

        /* Not found here, go up another level (until we reach the root) */

        ParentNode = ParentNode->Parent;
    }

    /* Not found in parent tree */

    return_ACPI_STATUS (AE_NOT_FOUND);
}

Generated on Sat May 26 2012 05:21:31 for ReactOS by doxygen 1.7.6.1

ReactOS is a registered trademark or a trademark of ReactOS Foundation in the United States and other countries.