2009-12-27 Carles Pina i Estany <carles@pina.cat>

* normal/cmdline.c (grub_cmdline_get): Print a space after prompt.
	* normal/main.c (grub_normal_read_line): Remove a space from the
	default prompt.
This commit is contained in:
carles 2009-12-27 00:43:21 +01:00
parent 714af9b9e4
commit 64fd18edbc
3 changed files with 10 additions and 4 deletions

View file

@ -1,3 +1,9 @@
2009-12-27 Carles Pina i Estany <carles@pina.cat>
* normal/cmdline.c (grub_cmdline_get): Print a space after prompt.
* normal/main.c (grub_normal_read_line): Remove a space from the
default prompt.
2009-12-27 Carles Pina i Estany <carles@pina.cat> 2009-12-27 Carles Pina i Estany <carles@pina.cat>
* loader/i386/efi/linux.c (GRUB_MOD_INIT): Improve command summary. * loader/i386/efi/linux.c (GRUB_MOD_INIT): Improve command summary.

View file

@ -268,14 +268,14 @@ grub_cmdline_get (const char *prompt, char cmdline[], unsigned max_len,
grub_refresh (); grub_refresh ();
} }
plen = grub_strlen (prompt_translated); plen = grub_strlen (prompt_translated) + sizeof (" ") - 1;
lpos = llen = 0; lpos = llen = 0;
buf[0] = '\0'; buf[0] = '\0';
if ((grub_getxy () >> 8) != 0) if ((grub_getxy () >> 8) != 0)
grub_putchar ('\n'); grub_putchar ('\n');
grub_printf ("%s", prompt_translated); grub_printf ("%s ", prompt_translated);
xpos = plen; xpos = plen;
ystart = ypos = (grub_getxy () & 0xFF); ystart = ypos = (grub_getxy () & 0xFF);

View file

@ -546,9 +546,9 @@ static grub_err_t
grub_normal_read_line (char **line, int cont) grub_normal_read_line (char **line, int cont)
{ {
grub_parser_t parser = grub_parser_get_current (); grub_parser_t parser = grub_parser_get_current ();
char prompt[sizeof("> ") + grub_strlen (parser->name)]; char prompt[sizeof(">") + grub_strlen (parser->name)];
grub_sprintf (prompt, "%s> ", parser->name); grub_sprintf (prompt, "%s>", parser->name);
while (1) while (1)
{ {