2009-11-23 Robert Millan <rmh.grub@aybabtu.com>
* include/grub/parser.h (grub_parser_register): Document need of `name' parameter. * normal/main.c (grub_normal_read_line): Simplify prompt string. * script/sh/main.c (grub_sh_parser, GRUB_MOD_INIT(sh)): Rename "sh" to "grub".
This commit is contained in:
parent
26743e871b
commit
4efeab03dc
4 changed files with 13 additions and 4 deletions
|
@ -1,3 +1,11 @@
|
|||
2009-11-23 Robert Millan <rmh.grub@aybabtu.com>
|
||||
|
||||
* include/grub/parser.h (grub_parser_register): Document need
|
||||
of `name' parameter.
|
||||
* normal/main.c (grub_normal_read_line): Simplify prompt string.
|
||||
* script/sh/main.c (grub_sh_parser, GRUB_MOD_INIT(sh)): Rename
|
||||
"sh" to "grub".
|
||||
|
||||
2009-11-23 Robert Millan <rmh.grub@aybabtu.com>
|
||||
|
||||
* Makefile.in ($(srcdir)/po/$(PACKAGE).pot): Pass --keyword=N_ to
|
||||
|
|
|
@ -88,6 +88,7 @@ grub_err_t EXPORT_FUNC(grub_parser_execute) (char *source);
|
|||
|
||||
static inline void
|
||||
grub_parser_register (const char *name __attribute__ ((unused)),
|
||||
/* `name' is ignored here, but used by genhandlerlist.sh. */
|
||||
grub_parser_t parser)
|
||||
{
|
||||
grub_handler_register (&grub_parser_class, GRUB_AS_HANDLER (parser));
|
||||
|
|
|
@ -523,9 +523,9 @@ static grub_err_t
|
|||
grub_normal_read_line (char **line, int cont)
|
||||
{
|
||||
grub_parser_t parser = grub_parser_get_current ();
|
||||
char prompt[8 + grub_strlen (parser->name)];
|
||||
char prompt[sizeof("> ") - 1 + grub_strlen (parser->name)];
|
||||
|
||||
grub_sprintf (prompt, "%s:%s> ", parser->name, (cont) ? "" : "grub");
|
||||
grub_sprintf (prompt, "%s> ", parser->name);
|
||||
|
||||
while (1)
|
||||
{
|
||||
|
|
|
@ -42,13 +42,13 @@ grub_normal_parse_line (char *line, grub_reader_getline_t getline)
|
|||
|
||||
static struct grub_parser grub_sh_parser =
|
||||
{
|
||||
.name = "sh",
|
||||
.name = "grub",
|
||||
.parse_line = grub_normal_parse_line
|
||||
};
|
||||
|
||||
GRUB_MOD_INIT(sh)
|
||||
{
|
||||
grub_parser_register ("sh", &grub_sh_parser);
|
||||
grub_parser_register ("grub", &grub_sh_parser);
|
||||
}
|
||||
|
||||
GRUB_MOD_FINI(sh)
|
||||
|
|
Loading…
Reference in a new issue