(use_curses): Initialize to 0 if !HAVE_LIBCURSES
(main): Check for curses use and set terminal to dumb if we don't use it (helps for --batch and variants of non-curses setup).
This commit is contained in:
parent
f7eda1235f
commit
ca6e068bb9
1 changed files with 9 additions and 0 deletions
|
@ -35,7 +35,11 @@ int grub_stage2 (void);
|
||||||
char *program_name = 0;
|
char *program_name = 0;
|
||||||
int use_config_file = 1;
|
int use_config_file = 1;
|
||||||
int use_preset_menu = 0;
|
int use_preset_menu = 0;
|
||||||
|
#ifdef HAVE_LIBCURSES
|
||||||
int use_curses = 1;
|
int use_curses = 1;
|
||||||
|
#else
|
||||||
|
int use_curses = 0;
|
||||||
|
#endif
|
||||||
int verbose = 0;
|
int verbose = 0;
|
||||||
int read_only = 0;
|
int read_only = 0;
|
||||||
int floppy_disks = 1;
|
int floppy_disks = 1;
|
||||||
|
@ -242,6 +246,11 @@ main (int argc, char **argv)
|
||||||
sleep (1);
|
sleep (1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* If we don't have curses (!HAVE_LIBCURSES or --no-curses or
|
||||||
|
--batch) put terminal to dumb for better handling of line i/o */
|
||||||
|
if (!use_curses)
|
||||||
|
terminal |= TERMINAL_DUMB;
|
||||||
|
|
||||||
/* Transfer control to the stage2 simulator. */
|
/* Transfer control to the stage2 simulator. */
|
||||||
exit (grub_stage2 ());
|
exit (grub_stage2 ());
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue