FreeBSD/sys/contrib/dev/acpica/components/debugger/dbutils.c
/*******************************************************************************
 *
 * FUNCTION:    AcpiDbMatchArgument
 *
 * PARAMETERS:  UserArgument            - User command line
 *              Arguments               - Array of commands to match against
 *
 * RETURN:      Index into command array or ACPI_TYPE_NOT_FOUND if not found
 *
 * DESCRIPTION: Search command array for a command match
 *
 ******************************************************************************/
AcpiDbMatchArgument
PARAMETERS:  UserArgument            - User command line
Arguments               - Array of commands to match against

Index into command array or ACPI_TYPE_NOT_FOUND if not found

Search command array for a command match
AcpiDbMatchArgument PARAMETERS : UserArgument - User command line Arguments - Array of commands to match against Index into command array or ACPI_TYPE_NOT_FOUND if not found Search command array for a command match
ACPI_OBJECT_TYPE
AcpiDbMatchArgument (
    char                    *UserArgument,
    ACPI_DB_ARGUMENT_INFO   *Arguments)
{
    UINT32                  i;
    if (!UserArgument || UserArgument[0] == 0)
    {
        return (ACPI_TYPE_NOT_FOUND);
    }
    for (i = 0; Arguments[i].Name; i++)
    {
        if (strstr (
            ACPI_CAST_PTR (char, Arguments[i].Name),
            ACPI_CAST_PTR (char, UserArgument)) == Arguments[i].Name)
        {
            return (i);
        }
    }
    return (ACPI_TYPE_NOT_FOUND);
}
ACPI_OBJECT_TYPE AcpiDbMatchArgument ( char * UserArgument , ACPI_DB_ARGUMENT_INFO * Arguments ) { UINT32 i ; if ( ! UserArgument || UserArgument [ 0 ] == 0 ) { return ( ACPI_TYPE_NOT_FOUND ) ; } for ( i = 0 ; Arguments [ i ] . Name ; i ++ ) { if ( strstr ( ACPI_CAST_PTR ( char , Arguments [ i ] . Name ) , ACPI_CAST_PTR ( char , UserArgument ) ) == Arguments [ i ] . Name ) { return ( i ) ; } } return ( ACPI_TYPE_NOT_FOUND ) ; }
FUNCTION:    AcpiDbMatchArgument
 PARAMETERS:  UserArgument            - User command line
              Arguments               - Array of commands to match against
FUNCTION : AcpiDbMatchArgument PARAMETERS : UserArgument - User command line Arguments - Array of commands to match against
/* Argument not recognized */