// SPDX-License-Identifier: BSD-3-Clause OR GPL-2.0 /****************************************************************************** * * Module Name: dbhistry - debugger HISTORY command * * Copyright (C) 2000 - 2023, Intel Corp. * *****************************************************************************/ #include <acpi/acpi.h> #include "accommon.h" #include "acdebug.h" #define _COMPONENT … ACPI_MODULE_NAME("dbhistry") #define HI_NO_HISTORY … #define HI_RECORD_HISTORY … #define HISTORY_SIZE … HISTORY_INFO; static HISTORY_INFO acpi_gbl_history_buffer[HISTORY_SIZE]; static u16 acpi_gbl_lo_history = …; static u16 acpi_gbl_num_history = …; static u16 acpi_gbl_next_history_index = …; /******************************************************************************* * * FUNCTION: acpi_db_add_to_history * * PARAMETERS: command_line - Command to add * * RETURN: None * * DESCRIPTION: Add a command line to the history buffer. * ******************************************************************************/ void acpi_db_add_to_history(char *command_line) { … } /******************************************************************************* * * FUNCTION: acpi_db_display_history * * PARAMETERS: None * * RETURN: None * * DESCRIPTION: Display the contents of the history buffer * ******************************************************************************/ void acpi_db_display_history(void) { … } /******************************************************************************* * * FUNCTION: acpi_db_get_from_history * * PARAMETERS: command_num_arg - String containing the number of the * command to be retrieved * * RETURN: Pointer to the retrieved command. Null on error. * * DESCRIPTION: Get a command from the history buffer * ******************************************************************************/ char *acpi_db_get_from_history(char *command_num_arg) { … } /******************************************************************************* * * FUNCTION: acpi_db_get_history_by_index * * PARAMETERS: cmd_num - Index of the desired history entry. * Values are 0...(acpi_gbl_next_cmd_num - 1) * * RETURN: Pointer to the retrieved command. Null on error. * * DESCRIPTION: Get a command from the history buffer * ******************************************************************************/ char *acpi_db_get_history_by_index(u32 cmd_num) { … }