Merge mainline into multiterm

This commit is contained in:
Vladimir 'phcoder' Serbinenko 2010-01-05 16:27:41 +01:00
commit 519634516f
239 changed files with 3529 additions and 1873 deletions

View file

@ -351,7 +351,7 @@ grub_cmdline_get (const char *prompt)
if (!buf)
return 0;
plen = grub_strlen (prompt_translated);
plen = grub_strlen (prompt_translated) + sizeof (" ") - 1;
lpos = llen = 0;
buf[0] = '\0';
@ -362,7 +362,7 @@ grub_cmdline_get (const char *prompt)
if ((grub_term_getxy (term) >> 8) != 0)
grub_putcode ('\n', term);
}
grub_printf ("%s", prompt_translated);
grub_printf ("%s ", prompt_translated);
{
struct cmdline_term *cl_term_cur;

View file

@ -1,7 +1,7 @@
/* completion.c - complete a command, a disk, a partition or a file */
/*
* GRUB -- GRand Unified Bootloader
* Copyright (C) 1999,2000,2001,2002,2003,2004,2005,2007,2008 Free Software Foundation, Inc.
* Copyright (C) 1999,2000,2001,2002,2003,2004,2005,2007,2008,2009 Free Software Foundation, Inc.
*
* GRUB is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by

View file

@ -23,6 +23,7 @@
#include <grub/misc.h>
#include <grub/command.h>
#include <grub/normal.h>
#include <grub/i18n.h>
static grub_err_t
grub_dyncmd_dispatcher (struct grub_command *cmd,
@ -132,7 +133,7 @@ read_command_list (void)
cmd = grub_register_command_prio (name,
grub_dyncmd_dispatcher,
0, "not loaded", prio);
0, N_("not loaded"), prio);
if (! cmd)
{
grub_free (name);

View file

@ -117,7 +117,7 @@ insert_handler (char *name, char *module)
data = 0;
item->cmd = grub_register_command (item->name, grub_handler_cmd, 0,
"Set active handler");
"Set active handler.");
if (! item->cmd)
{
grub_free (data);

View file

@ -554,12 +554,12 @@ static grub_err_t
grub_normal_read_line_real (char **line, int cont, int nested)
{
grub_parser_t parser = grub_parser_get_current ();
char prompt[sizeof("> ") + grub_strlen (parser->name)];
char prompt[sizeof(">") + grub_strlen (parser->name)];
if (cont)
grub_sprintf (prompt, "> ");
grub_sprintf (prompt, ">");
else
grub_sprintf (prompt, "%s> ", parser->name);
grub_sprintf (prompt, "%s>", parser->name);
while (1)
{
@ -640,9 +640,9 @@ GRUB_MOD_INIT(normal)
/* Register a command "normal" for the rescue mode. */
grub_register_command ("normal", grub_cmd_normal,
0, "Enter normal mode");
0, "Enter normal mode.");
grub_register_command ("normal_exit", grub_cmd_normal_exit,
0, "Exit from normal mode");
0, "Exit from normal mode.");
/* Reload terminal colors when these variables are written to. */
grub_register_variable_hook ("color_normal", NULL, grub_env_write_color_normal);

View file

@ -1,6 +1,6 @@
/*
* GRUB -- GRand Unified Bootloader
* Copyright (C) 2005,2006,2007,2008 Free Software Foundation, Inc.
* Copyright (C) 2005,2006,2007,2008,2009 Free Software Foundation, Inc.
*
* GRUB is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by

View file

@ -108,8 +108,8 @@ grub_print_message_indented (const char *msg, int margin_left, int margin_right,
while (grub_getstringwidth (current_position, next_new_line,term)
> line_len
|| (*next_new_line != ' ' && next_new_line > current_position &&
next_new_line != last_position))
|| (next_new_line != last_position && *next_new_line != ' '
&& next_new_line > current_position))
{
next_new_line--;
}
@ -359,7 +359,7 @@ static void
menu_text_print_timeout (int timeout, void *dataptr)
{
const char *msg =
_("The highlighted entry will be booted automatically in %ds.");
_("The highlighted entry will be executed automatically in %ds.");
struct menu_viewer_data *data = dataptr;
char *msg_translated;
int posx;

View file

@ -23,4 +23,3 @@
#include <grub/menu.h>
#include <grub/auth.h>

View file

@ -68,7 +68,10 @@ grub_normal_print_device_info (const char *name)
if (grub_errno == GRUB_ERR_NONE)
{
if (label && grub_strlen (label))
grub_printf_ (N_("- Label %s"), label);
{
grub_putchar (' ');
grub_printf_ (N_("- Label \"%s\""), label);
}
grub_free (label);
}
grub_errno = GRUB_ERR_NONE;
@ -81,6 +84,7 @@ grub_normal_print_device_info (const char *name)
if (grub_errno == GRUB_ERR_NONE)
{
grub_unixtime2datetime (tm, &datetime);
grub_putchar (' ');
grub_printf_ (N_("- Last modification time %d-%02d-%02d "
"%02d:%02d:%02d %s"),
datetime.year, datetime.month, datetime.day,