diff options
Diffstat (limited to 'com32/hdt/hdt-common.h')
-rw-r--r-- | com32/hdt/hdt-common.h | 34 |
1 files changed, 24 insertions, 10 deletions
diff --git a/com32/hdt/hdt-common.h b/com32/hdt/hdt-common.h index df7d2c98..c2299b48 100644 --- a/com32/hdt/hdt-common.h +++ b/com32/hdt/hdt-common.h @@ -48,16 +48,18 @@ #include "cpuid.h" #include "dmi/dmi.h" #include "hdt-ata.h" -#include "../lib/sys/vesa/vesa.h" +#include <lib/sys/vesa/vesa.h> #include <vpd/vpd.h> #include <libansi.h> #include <acpi/acpi.h> +#include <libupload/upload_backend.h> /* Declare a variable or data structure as unused. */ #define __unused __attribute__ (( unused )) /* This two values are used for switching for the menu to the CLI mode */ #define HDT_SWITCH_TO_CLI "hdt_switch_to_cli" +#define HDT_DUMP "hdt_dump" #define HDT_RETURN_TO_CLI 100 #define MAX_VESA_MODES 255 @@ -71,7 +73,7 @@ /* The char that separate two commands */ #define AUTO_SEPARATOR ";" /* The char that surround the list of commands */ -#define AUTO_DELIMITER "'" +#define AUTO_DELIMITER '\'' /* Graphic to load in background when using the vesa mode */ #define CLI_DEFAULT_BACKGROUND "backgnd.png" @@ -80,9 +82,14 @@ #define MAX_CLI_LINES 20 #define MAX_VESA_CLI_LINES 24 +struct upload_backend *upload; + /* Defines if the cli is quiet*/ bool quiet; +/* Defines if the cli is totally silent*/ +bool silent; + /* Defines if we must use the vesa mode */ bool vesamode; @@ -110,16 +117,18 @@ extern bool disable_more_printf; * one \n (and only one) */ #define more_printf(...) do {\ - if (__likely(!disable_more_printf)) {\ - if (display_line_nb == max_console_lines) {\ - display_line_nb=0;\ - printf("\n--More--");\ - get_key(stdin, 0);\ - printf("\033[2K\033[1G\033[1F");\ + if (__likely(!silent)) {\ + if (__likely(!disable_more_printf)) {\ + if (display_line_nb == max_console_lines) {\ + display_line_nb=0;\ + printf("\n--More--");\ + get_key(stdin, 0);\ + printf("\033[2K\033[1G\033[1F");\ + }\ + display_line_nb++;\ }\ - display_line_nb++;\ + printf(__VA_ARGS__);\ }\ - printf(__VA_ARGS__);\ } while (0); /* Display CPU registers for debugging purposes */ @@ -209,9 +218,13 @@ struct s_hardware { char modules_pcimap_path[255]; char modules_alias_path[255]; char pciids_path[255]; + char dump_path[255]; /* Dump path on the tftp server */ + char dump_filename[255]; /* Dump filename on the tftp server */ + char tftp_ip[255]; /* IP address of tftp server (dump mode) */ char memtest_label[255]; char auto_label[AUTO_COMMAND_SIZE]; char vesa_background[255]; + char postexec[255]; }; void reset_more_printf(void); @@ -236,4 +249,5 @@ int detect_vesa(struct s_hardware *hardware); void detect_memory(struct s_hardware *hardware); void init_console(struct s_hardware *hardware); void detect_hardware(struct s_hardware *hardware); +void dump(struct s_hardware *hardware); #endif |