FreeBSD/sys/contrib/dev/acpica/components/debugger/dbtest.c
/*******************************************************************************
 *
 * FUNCTION:    AcpiDbTestAllObjects
 *
 * PARAMETERS:  None
 *
 * RETURN:      None
 *
 * DESCRIPTION: This test implements the OBJECTS subcommand. It exercises the
 *              namespace by reading/writing/comparing all data objects such
 *              as integers, strings, buffers, fields, buffer fields, etc.
 *
 ******************************************************************************/


None

This test implements the OBJECTS subcommand. It exercises the
namespace by reading/writing/comparing all data objects such
as integers, strings, buffers, fields, buffer fields, etc.
None This test implements the OBJECTS subcommand . It exercises the namespace by reading / writing / comparing all data objects such as integers strings buffers fields buffer fields etc .
static void
AcpiDbTestAllObjects (
    void)
{
    ACPI_STATUS             Status;
    if (!ReadHandle)
    {
        Status = AcpiInstallMethod (ReadMethodCode);
        if (ACPI_FAILURE (Status))
        {
            AcpiOsPrintf ("%s, Could not install debugger read method\n",
                AcpiFormatException (Status));
            return;
        }
        Status = AcpiGetHandle (NULL, ACPI_DB_READ_METHOD, &ReadHandle);
        if (ACPI_FAILURE (Status))
        {
            AcpiOsPrintf ("Could not obtain handle for debug method %s\n",
                ACPI_DB_READ_METHOD);
            return;
        }
    }
    if (!WriteHandle)
    {
        Status = AcpiInstallMethod (WriteMethodCode);
        if (ACPI_FAILURE (Status))
        {
            AcpiOsPrintf ("%s, Could not install debugger write method\n",
                AcpiFormatException (Status));
            return;
        }
        Status = AcpiGetHandle (NULL, ACPI_DB_WRITE_METHOD, &WriteHandle);
        if (ACPI_FAILURE (Status))
        {
            AcpiOsPrintf ("Could not obtain handle for debug method %s\n",
                ACPI_DB_WRITE_METHOD);
            return;
        }
    }
    (void) AcpiWalkNamespace (ACPI_TYPE_ANY, ACPI_ROOT_OBJECT,
        ACPI_UINT32_MAX, AcpiDbTestOneObject, NULL, NULL, NULL);
}
static void AcpiDbTestAllObjects ( void ) { ACPI_STATUS Status ; if ( ! ReadHandle ) { Status = AcpiInstallMethod ( ReadMethodCode ) ; if ( ACPI_FAILURE ( Status ) ) { AcpiOsPrintf ( " \n " , AcpiFormatException ( Status ) ) ; return ; } Status = AcpiGetHandle ( NULL , ACPI_DB_READ_METHOD , & ReadHandle ) ; if ( ACPI_FAILURE ( Status ) ) { AcpiOsPrintf ( " \n " , ACPI_DB_READ_METHOD ) ; return ; } } if ( ! WriteHandle ) { Status = AcpiInstallMethod ( WriteMethodCode ) ; if ( ACPI_FAILURE ( Status ) ) { AcpiOsPrintf ( " \n " , AcpiFormatException ( Status ) ) ; return ; } Status = AcpiGetHandle ( NULL , ACPI_DB_WRITE_METHOD , & WriteHandle ) ; if ( ACPI_FAILURE ( Status ) ) { AcpiOsPrintf ( " \n " , ACPI_DB_WRITE_METHOD ) ; return ; } } ( void ) AcpiWalkNamespace ( ACPI_TYPE_ANY , ACPI_ROOT_OBJECT , ACPI_UINT32_MAX , AcpiDbTestOneObject , NULL , NULL , NULL ) ; }
FUNCTION:    AcpiDbTestAllObjects
 PARAMETERS:  None
FUNCTION : AcpiDbTestAllObjects PARAMETERS : None
/* Install the debugger read-object control method if necessary */ /* Install the debugger write-object control method if necessary */ /* Walk the entire namespace, testing each supported named data object */