FreeBSD/sys/contrib/dev/acpica/components/utilities/utdecode.c
/*******************************************************************************
 *
 * FUNCTION:    AcpiUtGetNodeName
 *
 * PARAMETERS:  Object               - A namespace node
 *
 * RETURN:      ASCII name of the node
 *
 * DESCRIPTION: Validate the node and return the node's ACPI name.
 *
 ******************************************************************************/
AcpiUtGetNodeName
PARAMETERS:  Object               - A namespace node

ASCII name of the node

Validate the node and return the node's ACPI name.
AcpiUtGetNodeName PARAMETERS : Object - A namespace node ASCII name of the node Validate the node and return the node ' s ACPI name .
const char *
AcpiUtGetNodeName (
    void                    *Object)
{
    ACPI_NAMESPACE_NODE     *Node = (ACPI_NAMESPACE_NODE *) Object;
    if (!Object)
    {
        return ("NULL");
    }
    if ((Object == ACPI_ROOT_OBJECT) ||
        (Object == AcpiGbl_RootNode))
    {
        return ("\"\\\" ");
    }
    if (ACPI_GET_DESCRIPTOR_TYPE (Node) != ACPI_DESC_TYPE_NAMED)
    {
        return ("####");
    }
    AcpiUtRepairName (Node->Name.Ascii);
    return (Node->Name.Ascii);
}
const char * AcpiUtGetNodeName ( void * Object ) { ACPI_NAMESPACE_NODE * Node = ( ACPI_NAMESPACE_NODE * ) Object ; if ( ! Object ) { return ( " " ) ; } if ( ( Object == ACPI_ROOT_OBJECT ) || ( Object == AcpiGbl_RootNode ) ) { return ( " \" \\ \" " ) ; } if ( ACPI_GET_DESCRIPTOR_TYPE ( Node ) != ACPI_DESC_TYPE_NAMED ) { return ( " " ) ; } AcpiUtRepairName ( Node -> Name . Ascii ) ; return ( Node -> Name . Ascii ) ; }
FUNCTION:    AcpiUtGetNodeName
 PARAMETERS:  Object               - A namespace node
FUNCTION : AcpiUtGetNodeName PARAMETERS : Object - A namespace node
/* Must return a string of exactly 4 characters == ACPI_NAME_SIZE */ /* Check for Root node */ /* Descriptor must be a namespace node */ /*
     * Ensure name is valid. The name was validated/repaired when the node
     * was created, but make sure it has not been corrupted.
     */ /* Return the name */