From: Carles Pina i Estany <carles@pina.cat>
To: grub-devel@gnu.org
Subject: regression fix
Date: Sat, 26 Dec 2009 01:35:53 +0100 [thread overview]
Message-ID: <20091226003553.GA5373@pina.cat> (raw)
[-- 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)
{
next reply other threads:[~2009-12-26 0:35 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-12-26 0:35 Carles Pina i Estany [this message]
2009-12-26 13:46 ` regression fix Robert Millan
2009-12-26 23:44 ` Carles Pina i Estany
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20091226003553.GA5373@pina.cat \
--to=carles@pina.cat \
--cc=grub-devel@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.