Hallo,
Unfortunaly, the patch in the last mail was not complete.
This mail shuld contains the corrected version.
Sorry !!
Best Regards:
Jochen Schmitt
--- grub-0.90.org/stage2/builtins.c Thu Nov 8 20:13:58 2001
+++ grub-0.90/stage2/builtins.c Thu Nov 8 22:02:13 2001
@@ -77,6 +77,12 @@
int grub_timeout = -1;
/* Whether to show the menu or not. */
int show_menu = 1;
+/* hide the border */
+int hide_border = 0;
+/* hide usage */
+int hide_usage = 0;
+/* hide countdown */
+int hide_countdown = 0;
/* The BIOS drive map. */
static unsigned short bios_drive_map[DRIVE_MAP_SIZE + 1];
@@ -4691,7 +4697,59 @@
" only works with the vga interface."
};
#endif /* VGA16 */
-
+
+/* noborder */
+static int
+noborder_func(char *arg, int flags)
+{
+ hide_border = 1;
+ return (0);
+}
+
+static struct builtin builtin_noborder =
+ {
+ "noborder",
+ noborder_func,
+ BUILTIN_CMDLINE | BUILTIN_MENU,
+ "noborder",
+ "Suppress display of the border around the menulist"
+ " when the meu should be display."
+ };
+
+/* hidecountdown */
+static int
+hidecountdown_func(char *arg, int flags)
+{
+ hide_countdown = 1;
+ return 0;
+}
+
+static struct builtin builtin_hidecountdown =
+ {
+ "hidecountdown",
+ hidecountdown_func,
+ BUILTIN_CMDLINE | BUILTIN_MENU,
+ "hidecountdown",
+ "Hide the countdown before booting of a OS"
+ };
+
+/* hideusage */
+static int
+hideusage_func(char *arg, int flags)
+{
+ hide_usage = 1;
+ return 0;
+}
+
+static struct builtin builtin_hideusage =
+ {
+ "hideusage",
+ hideusage_func,
+ BUILTIN_CMDLINE | BUILTIN_MENU,
+ "hideusage"
+ "Hide the Usage information display"
+ };
+
/* The table of builtin commands. Sorted in dictionary order. */
struct builtin *builtin_table[] =
{
@@ -4734,7 +4792,9 @@
&builtin_geometry,
&builtin_halt,
&builtin_help,
+ &builtin_hidecountdown,
&builtin_hiddenmenu,
+ &builtin_hideusage,
&builtin_hide,
#ifdef SUPPORT_NETBOOT
&builtin_ifconfig,
@@ -4752,6 +4812,7 @@
#endif /* USE_MD5_PASSWORDS */
&builtin_module,
&builtin_modulenounzip,
+ &builtin_noborder,
&builtin_partnew,
&builtin_parttype,
&builtin_password,
--- grub-0.90.org/stage2/stage2.c Thu Nov 8 20:13:58 2001
+++ grub-0.90/stage2/stage2.c Thu Nov 8 22:00:42 2001
@@ -215,6 +215,9 @@
}
#endif
+ if(hide_border)
+ return;
+
gotoxy (view_x0 + 1, y);
putchar (disp_ul);
@@ -421,7 +424,8 @@
if (terminal & TERMINAL_DUMB)
print_entries_raw (num_entries, first_entry, menu_entries);
- grub_printf ("\n\
+ if(!hide_usage)
+ grub_printf ("\n\
Use the %c and %c keys to select which entry is highlighted.\n",
disp_up, disp_down);
@@ -491,22 +495,25 @@
}
else if (! auth && password)
{
- printf ("\
+ if(!hide_usage)
+ printf ("\
Press enter to boot the selected OS or \'p\' to enter a\n\
password to unlock the next set of features.");
}
else
{
- if (config_entries)
- printf ("\
+ if(!hide_usage) {
+ if (config_entries)
+ printf ("\
Press enter to boot the selected OS, \'e\' to edit the\n\
commands before booting, or \'c\' for a command-line.");
- else
- printf ("\
+ else
+ printf ("\
Press \'b\' to boot, \'e\' to edit the selected command in the\n\
boot sequence, \'c\' for a command-line, \'o\' to open a new line\n\
after (\'O\' for before) the selected line, \'d\' to remove the\n\
selected line, or escape to go back to the main menu.");
+ }
}
if (terminal & TERMINAL_DUMB)
@@ -540,14 +547,16 @@
/* else not booting yet! */
time2 = time1;
- if (terminal & TERMINAL_DUMB)
+ if (!hide_countdown) {
+ if (terminal & TERMINAL_DUMB)
grub_printf ("\r Entry %d will be booted automatically in %d seconds.
",
entryno, grub_timeout);
- else
- {
- gotoxy (view_x0 + 3, view_y1 - 3);
- printf ("The highlighted entry will be booted automatically in %d
seconds. ", grub_timeout);
- gotoxy (view_x0 - 6, view_y0 + 4 + entryno);
+ else
+ {
+ gotoxy (view_x0 + 3, view_y1 - 3);
+ printf ("The highlighted entry will be booted automatically in %d
+seconds. ", grub_timeout);
+ gotoxy (view_x0 - 6, view_y0 + 4 + entryno);
+ }
}
grub_timeout--;
--- grub-0.90.org/stage2/shared.h Thu Nov 8 20:13:57 2001
+++ grub-0.90/stage2/shared.h Thu Nov 8 20:30:36 2001
@@ -939,6 +939,10 @@
/* This variable specifies which console should be used. */
extern int terminal;
+extern int hide_border;
+extern int hide_usage;
+extern int hide_countdown;
+
#define TERMINAL_CONSOLE (1 << 0) /* keyboard and screen */
#define TERMINAL_SERIAL (1 << 1) /* serial console */
#define TERMINAL_HERCULES (1 << 2) /* hercules */