/* Quiet mode - make the output more quiet */
quiet = false;
+ /* Vesa mode isn't set until we explictly call it*/
+ vesamode = false;
+
for (int i = 1; i < argc; i++) {
if (!strncmp(argv[i], "quiet", 5)) {
quiet = true;
strncpy(hardware->reboot_label, argv[i] + 7,
sizeof(hardware->reboot_label));
convert_isolinux_filename(hardware->reboot_label,hardware);
+ } else if (!strncmp(argv[i], "vesa", 4)) {
+ vesamode=true;
+ max_console_lines=24;
} else if (!strncmp(argv[i], "auto=", 5)) {
/* The auto= parameter is separated in several argv[]
* as it can contains spaces.
/* Defines if the cli is quiet*/
bool quiet;
+/* Defines if we must use the vesa mode */
+bool vesamode;
+
+/* Defines the number of lines in the console
+ * Default is 20 for a std console */
+extern int max_console_lines;
+
extern int display_line_nb;
extern bool disable_more_printf;
*/
#define more_printf(...) do {\
if (__likely(!disable_more_printf)) {\
- if (display_line_nb == 20) {\
+ if (display_line_nb == max_console_lines) {\
display_line_nb=0;\
printf("\n--More--");\
get_key(stdin, 0);\
#include <stdio.h>
#include <console.h>
#include <consoles.h>
+#include <syslinux/vesacon.h>
#include "hdt.h"
#include "hdt-cli.h"
#include "hdt-menu.h"
int display_line_nb = 0;
bool disable_more_printf = false;
+/* Defines the number of lines in the console
+ * Default is 20 for a std console */
+int max_console_lines=20;
int main(const int argc, const char *argv[])
{
snprintf(version_string, sizeof version_string, "%s %s (%s)",
PRODUCT_NAME,VERSION, CODENAME);
+ /* Detecting parameters */
+ detect_parameters(argc, argv, &hardware);
+
/* Opening the Syslinux console */
- console_ansi_raw();
+ if (vesamode) openconsole(&dev_rawcon_r, &dev_vesaserial_w);
+ else console_ansi_raw();
/* Cleaning structures */
init_hardware(&hardware);
/* Detecting Syslinux version */
detect_syslinux(&hardware);
-
- /* Detecting parameters */
- detect_parameters(argc, argv, &hardware);
-
+
/* Clear the screen and reset position of the cursor */
clear_screen();
printf("\033[1;1H");
-
+
printf("%s\n", version_string);
+
if ((arg = find_argument(argv + 1, "nomenu")) || (find_argument(argv+1,"auto")))
start_cli_mode(&hardware);
else {