grub-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Commands not executed in the else branch


From: Pavel Roskin
Subject: Re: Commands not executed in the else branch
Date: Mon, 27 Apr 2009 10:10:03 -0400
User-agent: Internet Messaging Program (IMP) H3 (4.1.4)

Quoting Bean <address@hidden>:

Hi,

It's caused by the propagation of grub_errno value. This patch should fix it.

diff --git a/normal/execute.c b/normal/execute.c
index 8bf6d17..aec4589 100644
--- a/normal/execute.c
+++ b/normal/execute.c
@@ -177,6 +177,7 @@ grub_script_execute_cmdif (struct grub_script_cmd *cmd)
      read from the env variable `?'.  */
   grub_script_execute_cmd (cmdif->exec_to_evaluate);
   result = grub_env_get ("?");
+  grub_errno = 0;

   /* Execute the `if' or the `else' part depending on the value of
      `?'.  */

Thanks, it's working fine!

--
Regards,
Pavel Roskin




reply via email to

[Prev in Thread] Current Thread [Next in Thread]