Magellan Linux

Contents of /trunk/grub/patches/grub-0.97-endedit.patch

Parent Directory Parent Directory | Revision Log Revision Log


Revision 144 - (show annotations) (download)
Tue May 8 20:06:05 2007 UTC (17 years, 5 months ago) by niro
File size: 2601 byte(s)
-import

1 Index: stage2/cmdline.c
2 ===================================================================
3 RCS file: /cvsroot/grub/grub/stage2/cmdline.c,v
4 retrieving revision 1.27
5 diff -u -r1.27 cmdline.c
6 --- stage2/cmdline.c 3 Dec 2002 00:02:53 -0000 1.27
7 +++ stage2/cmdline.c 6 Jan 2003 05:33:33 -0000
8 @@ -48,12 +48,17 @@
9
10 /* Print a helpful message for the command-line interface. */
11 void
12 -print_cmdline_message (int forever)
13 +print_cmdline_message (int type)
14 {
15 printf (" [ Minimal BASH-like line editing is supported. For the first word, TAB\n"
16 " lists possible command completions. Anywhere else TAB lists the possible\n"
17 - " completions of a device/filename.%s ]\n",
18 - (forever ? "" : " ESC at any time exits."));
19 + " completions of a device/filename.");
20 + if (type == CMDLINE_NORMAL_MODE)
21 + printf(" ESC at any time exits.");
22 + if (type == CMDLINE_EDIT_MODE)
23 + printf(" ESC at any time cancels. ENTER \n"
24 + " at any time accepts your changes.");
25 + printf("]\n");
26 }
27
28 /* Find the builtin whose command name is COMMAND and return the
29 @@ -128,7 +133,7 @@
30 print_network_configuration ();
31 grub_putchar ('\n');
32 #endif
33 - print_cmdline_message (forever);
34 + print_cmdline_message (forever ? CMDLINE_FOREVER_MODE : CMDLINE_NORMAL_MODE);
35
36 while (1)
37 {
38 Index: stage2/shared.h
39 ===================================================================
40 RCS file: /cvsroot/grub/grub/stage2/shared.h,v
41 retrieving revision 1.90
42 diff -u -r1.90 shared.h
43 --- stage2/shared.h 3 Dec 2002 00:02:53 -0000 1.90
44 +++ stage2/shared.h 6 Jan 2003 05:33:33 -0000
45 @@ -843,9 +843,15 @@
46 void init_config (void);
47 char *skip_to (int after_equal, char *cmdline);
48 struct builtin *find_command (char *command);
49 -void print_cmdline_message (int forever);
50 void enter_cmdline (char *heap, int forever);
51 int run_script (char *script, char *heap);
52 +
53 +/* the flags for the cmdline message */
54 +#define CMDLINE_FOREVER_MODE 0x0
55 +#define CMDLINE_NORMAL_MODE 0x1
56 +#define CMDLINE_EDIT_MODE 0x2
57 +
58 +void print_cmdline_message (int type);
59 #endif
60
61 /* C library replacement functions with identical semantics. */
62 Index: stage2/stage2.c
63 ===================================================================
64 RCS file: /cvsroot/grub/grub/stage2/stage2.c,v
65 retrieving revision 1.42
66 diff -u -r1.42 stage2.c
67 --- stage2/stage2.c 4 Dec 2002 00:55:45 -0000 1.42
68 +++ stage2/stage2.c 6 Jan 2003 05:33:33 -0000
69 @@ -655,7 +655,7 @@
70 else
71 {
72 cls ();
73 - print_cmdline_message (0);
74 + print_cmdline_message (CMDLINE_EDIT_MODE);
75
76 new_heap = heap + NEW_HEAPSIZE + 1;
77