]> git.ipfire.org Git - thirdparty/grub.git/commitdiff
2010-02-14 Vladimir Serbinenko <phcoder@gmail.com>
authorVladimir 'phcoder' Serbinenko <phcoder@gmail.com>
Sun, 14 Feb 2010 13:46:19 +0000 (14:46 +0100)
committerVladimir 'phcoder' Serbinenko <phcoder@gmail.com>
Sun, 14 Feb 2010 13:46:19 +0000 (14:46 +0100)
Prevent unknown commands from stopping menuentry execution.

* script/execute.c (grub_script_execute_cmdline): Print error after
unknown command.

ChangeLog
script/execute.c

index 1dfaca669d6eea2a504e5b40c2ef06471075941f..7c8e0a9883b5e5d6ec77926f2a8cd03ccbd83a90 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2010-02-14  Vladimir Serbinenko  <phcoder@gmail.com>
+
+       Prevent unknown commands from stopping menuentry execution.
+
+       * script/execute.c (grub_script_execute_cmdline): Print error after
+       unknown command.
+
 2010-02-14  Vladimir Serbinenko  <phcoder@gmail.com>
 
        * fs/i386/pc/pxe.c (GRUB_MOD_INIT): Fix typo.
index a0773c191d66303a1ec5dfe3c358927587fd5999..6e914aeeb73781d787a3bb2b1ea5c6e924850447 100644 (file)
@@ -100,8 +100,7 @@ grub_script_execute_cmdline (struct grub_script_cmd *cmd)
   grubcmd = grub_command_find (cmdname);
   if (! grubcmd)
     {
-      /* Shouldn't happen but precaution is good.  */
-      grub_print_error ();
+      grub_errno = GRUB_ERR_NONE;
 
       /* It's not a GRUB command, try all functions.  */
       func = grub_script_function_find (cmdname);
@@ -126,6 +125,8 @@ grub_script_execute_cmdline (struct grub_script_cmd *cmd)
          grub_snprintf (errnobuf, sizeof (errnobuf), "%d", grub_errno);
          grub_env_set ("?", errnobuf);
 
+         grub_print_error ();
+
          return 0;
        }
     }