* 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-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.
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);
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);