drivers/acpi/acpica/dbinput.c

Source file repositories/reference/linux-study-clean/drivers/acpi/acpica/dbinput.c

File Facts

System
Linux kernel
Corpus path
drivers/acpi/acpica/dbinput.c
Extension
.c
Size
29049 bytes
Lines
1270
Domain
Driver Families
Bucket
drivers/acpi
Inferred role
Driver Families: implementation source
Status
source implementation candidate

Why This File Exists

Repeatable hardware-adapter layer. Deep compatibility for every driver is out of scope; this atlas records patterns, probe lifecycles, bus glue, IRQ/DMA usage, and links back to core abstractions.

Dependency Surface

Detected Declarations

Annotated Snippet

if (tolower((int)*command) != tolower((int)*invocation)) {
			return (FALSE);
		}

		invocation++;
		command++;
	}

	/* Print the appropriate number of help lines */

	line_count = help->line_count;
	while (line_count) {
		acpi_os_printf("%-38s : %s", help->invocation,
			       help->description);
		help++;
		line_count--;
	}

	return (TRUE);
}

/*******************************************************************************
 *
 * FUNCTION:    acpi_db_display_command_info
 *
 * PARAMETERS:  command             - Command string to match
 *              display_all         - Display all matching commands, or just
 *                                    the first one (substring match)
 *
 * RETURN:      None
 *
 * DESCRIPTION: Display help information for a Debugger command.
 *
 ******************************************************************************/

static void acpi_db_display_command_info(const char *command, u8 display_all)
{
	const struct acpi_db_command_help *next;
	u8 matched;

	next = acpi_gbl_db_command_help;
	while (next->invocation) {
		matched = acpi_db_match_command_help(command, next);
		if (!display_all && matched) {
			return;
		}

		next++;
	}
}

/*******************************************************************************
 *
 * FUNCTION:    acpi_db_display_help
 *
 * PARAMETERS:  command             - Optional command string to display help.
 *                                    if not specified, all debugger command
 *                                    help strings are displayed
 *
 * RETURN:      None
 *
 * DESCRIPTION: Display help for a single debugger command, or all of them.
 *
 ******************************************************************************/

static void acpi_db_display_help(char *command)
{
	const struct acpi_db_command_help *next = acpi_gbl_db_command_help;

	if (!command) {

		/* No argument to help, display help for all commands */

		acpi_os_printf("\nSummary of AML Debugger Commands\n\n");

		while (next->invocation) {
			acpi_os_printf("%-38s%s", next->invocation,
				       next->description);
			next++;
		}
		acpi_os_printf("\n");

	} else {
		/* Display help for all commands that match the substring */

		acpi_db_display_command_info(command, TRUE);
	}
}

/*******************************************************************************

Annotation

Implementation Notes