All the mail mirrored from lore.kernel.org
 help / color / mirror / Atom feed
* regression fix
@ 2009-12-26  0:35 Carles Pina i Estany
  2009-12-26 13:46 ` Robert Millan
  0 siblings, 1 reply; 3+ messages in thread
From: Carles Pina i Estany @ 2009-12-26  0:35 UTC (permalink / raw
  To: grub-devel

[-- Attachment #1: Type: text/plain, Size: 202 bytes --]


Hi,

Commit 1949 introduced a bug using TAB due a miss-understanding that I
had with the code.

Find an attached patch that fix it.

Brief ok from someone?

-- 
Carles Pina i Estany
	http://pinux.info

[-- Attachment #2: space02.patch --]
[-- Type: text/x-diff, Size: 1600 bytes --]

=== modified file 'ChangeLog'
--- ChangeLog	2009-12-25 23:50:59 +0000
+++ ChangeLog	2009-12-26 00:17:47 +0000
@@ -1,5 +1,11 @@
 2009-12-26  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-26  Carles Pina i Estany  <carles@pina.cat>
+
 	* commands/help.c (grub_cmd_help): Print the command name before the
 	summary.
 	(GRUB_MOD_INIT): Remove command name from the summary.

=== modified file 'normal/cmdline.c'
--- normal/cmdline.c	2009-12-20 23:32:15 +0000
+++ normal/cmdline.c	2009-12-26 00:19:41 +0000
@@ -268,14 +268,14 @@ grub_cmdline_get (const char *prompt, ch
       grub_refresh ();
     }
 
-  plen = grub_strlen (prompt_translated);
+  plen = grub_strlen (prompt_translated) + 1;
   lpos = llen = 0;
   buf[0] = '\0';
 
   if ((grub_getxy () >> 8) != 0)
     grub_putchar ('\n');
 
-  grub_printf ("%s", prompt_translated);
+  grub_printf ("%s ", prompt_translated);
 
   xpos = plen;
   ystart = ypos = (grub_getxy () & 0xFF);

=== modified file 'normal/main.c'
--- normal/main.c	2009-12-23 16:41:32 +0000
+++ normal/main.c	2009-12-26 00:10:33 +0000
@@ -546,9 +546,9 @@ static grub_err_t
 grub_normal_read_line (char **line, int cont)
 {
   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)
     {


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: regression fix
  2009-12-26  0:35 regression fix Carles Pina i Estany
@ 2009-12-26 13:46 ` Robert Millan
  2009-12-26 23:44   ` Carles Pina i Estany
  0 siblings, 1 reply; 3+ messages in thread
From: Robert Millan @ 2009-12-26 13:46 UTC (permalink / raw
  To: The development of GNU GRUB

On Sat, Dec 26, 2009 at 01:35:53AM +0100, Carles Pina i Estany wrote:
> 
> Hi,
> 
> Commit 1949 introduced a bug using TAB due a miss-understanding that I
> had with the code.

Oh, good to know.  I was wondering why TAB expansion did these weird
things ;-)

> -  plen = grub_strlen (prompt_translated);
> +  plen = grub_strlen (prompt_translated) + 1;

Please consider if sizeof() would make sense here.

-- 
Robert Millan

  "Be the change you want to see in the world" -- Gandhi



^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: regression fix
  2009-12-26 13:46 ` Robert Millan
@ 2009-12-26 23:44   ` Carles Pina i Estany
  0 siblings, 0 replies; 3+ messages in thread
From: Carles Pina i Estany @ 2009-12-26 23:44 UTC (permalink / raw
  To: The development of GNU GRUB


Hi,

On Dec/26/2009, Robert Millan wrote:
> On Sat, Dec 26, 2009 at 01:35:53AM +0100, Carles Pina i Estany wrote:
> > 
> > Hi,
> > 
> > Commit 1949 introduced a bug using TAB due a miss-understanding that I
> > had with the code.
> 
> Oh, good to know.  I was wondering why TAB expansion did these weird
> things ;-)

Sorry for the inconvenience :-)

Pushing now.

-- 
Carles Pina i Estany
	http://pinux.info



^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2009-12-26 23:44 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-12-26  0:35 regression fix Carles Pina i Estany
2009-12-26 13:46 ` Robert Millan
2009-12-26 23:44   ` Carles Pina i Estany

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.