2010-02-10 Vladimir Serbinenko <phcoder@gmail.com>
* script/execute.c (grub_script_execute_cmdline): Use grub_print_error to show messages instead of discarding them. Process errors after executing command and not before. Keep old method too as precaution.
This commit is contained in:
parent
660960d697
commit
dd01d3970f
2 changed files with 14 additions and 2 deletions
|
@ -1,3 +1,10 @@
|
|||
2010-02-10 Vladimir Serbinenko <phcoder@gmail.com>
|
||||
|
||||
* script/execute.c (grub_script_execute_cmdline): Use grub_print_error
|
||||
to show messages instead of discarding them.
|
||||
Process errors after executing command and not before. Keep old method
|
||||
too as precaution.
|
||||
|
||||
2010-02-09 Vladimir Serbinenko <phcoder@gmail.com>
|
||||
|
||||
* configure.ac: Check for ft2build.h.
|
||||
|
|
|
@ -100,8 +100,8 @@ grub_script_execute_cmdline (struct grub_script_cmd *cmd)
|
|||
grubcmd = grub_command_find (cmdname);
|
||||
if (! grubcmd)
|
||||
{
|
||||
/* Ignore errors. */
|
||||
grub_errno = GRUB_ERR_NONE;
|
||||
/* Shouldn't happen but precaution is good. */
|
||||
grub_print_error ();
|
||||
|
||||
/* It's not a GRUB command, try all functions. */
|
||||
func = grub_script_function_find (cmdname);
|
||||
|
@ -156,6 +156,11 @@ grub_script_execute_cmdline (struct grub_script_cmd *cmd)
|
|||
grub_free (args[i]);
|
||||
grub_free (args);
|
||||
|
||||
if (grub_errno == GRUB_ERR_TEST_FAILURE)
|
||||
grub_errno = GRUB_ERR_NONE;
|
||||
|
||||
grub_print_error ();
|
||||
|
||||
grub_snprintf (errnobuf, sizeof (errnobuf), "%d", ret);
|
||||
grub_env_set ("?", errnobuf);
|
||||
|
||||
|
|
Loading…
Reference in a new issue