Index: ChangeLog =================================================================== RCS file: /cvsroot/grub/grub/ChangeLog,v retrieving revision 1.543 diff -u -r1.543 ChangeLog --- ChangeLog 4 Jan 2003 23:22:42 -0000 1.543 +++ ChangeLog 6 Jan 2003 05:33:33 -0000 @@ -1,3 +1,13 @@ +2003-01-06 Jeremy Katz + + * stage2/cmdline.c (print_cmdline_message): Make the message + clearer on what to do when editing an entry in cmdline mode. + (enter_cmdline): Use new print_cmdline_message args. + * stage2/stage2.c (run_menu): Likewise. + * stage2/shared.h (CMDLINE_FOREVER_MODE): Defined. + (CMDLINE_NORMAL_MODE): Likewise. + (CMDLINE_EDIT_MODE): Likewise. + 2003-01-05 Yoshinori K. Okuji * configure.in (CFLAGS): When the default CFLAGS is used, Index: stage2/cmdline.c =================================================================== RCS file: /cvsroot/grub/grub/stage2/cmdline.c,v retrieving revision 1.27 diff -u -r1.27 cmdline.c --- stage2/cmdline.c 3 Dec 2002 00:02:53 -0000 1.27 +++ stage2/cmdline.c 6 Jan 2003 05:33:33 -0000 @@ -48,12 +48,17 @@ /* Print a helpful message for the command-line interface. */ void -print_cmdline_message (int forever) +print_cmdline_message (int type) { printf (" [ Minimal BASH-like line editing is supported. For the first word, TAB\n" " lists possible command completions. Anywhere else TAB lists the possible\n" - " completions of a device/filename.%s ]\n", - (forever ? "" : " ESC at any time exits.")); + " completions of a device/filename."); + if (type == CMDLINE_NORMAL_MODE) + printf(" ESC at any time exits."); + if (type == CMDLINE_EDIT_MODE) + printf(" ESC at any time cancels. ENTER \n" + " at any time accepts your changes."); + printf("]\n"); } /* Find the builtin whose command name is COMMAND and return the @@ -128,7 +133,7 @@ print_network_configuration (); grub_putchar ('\n'); #endif - print_cmdline_message (forever); + print_cmdline_message (forever ? CMDLINE_FOREVER_MODE : CMDLINE_NORMAL_MODE); while (1) { Index: stage2/shared.h =================================================================== RCS file: /cvsroot/grub/grub/stage2/shared.h,v retrieving revision 1.90 diff -u -r1.90 shared.h --- stage2/shared.h 3 Dec 2002 00:02:53 -0000 1.90 +++ stage2/shared.h 6 Jan 2003 05:33:33 -0000 @@ -843,9 +843,15 @@ void init_config (void); char *skip_to (int after_equal, char *cmdline); struct builtin *find_command (char *command); -void print_cmdline_message (int forever); void enter_cmdline (char *heap, int forever); int run_script (char *script, char *heap); + +/* the flags for the cmdline message */ +#define CMDLINE_FOREVER_MODE 0x0 +#define CMDLINE_NORMAL_MODE 0x1 +#define CMDLINE_EDIT_MODE 0x2 + +void print_cmdline_message (int type); #endif /* C library replacement functions with identical semantics. */ Index: stage2/stage2.c =================================================================== RCS file: /cvsroot/grub/grub/stage2/stage2.c,v retrieving revision 1.42 diff -u -r1.42 stage2.c --- stage2/stage2.c 4 Dec 2002 00:55:45 -0000 1.42 +++ stage2/stage2.c 6 Jan 2003 05:33:33 -0000 @@ -655,7 +655,7 @@ else { cls (); - print_cmdline_message (0); + print_cmdline_message (CMDLINE_EDIT_MODE); new_heap = heap + NEW_HEAPSIZE + 1;