]> git.ozlabs.org Git - petitboot/commitdiff
discover/boot: Fix condition for updating boot params
authorJeremy Kerr <jk@ozlabs.org>
Thu, 5 Dec 2013 06:32:28 +0000 (14:32 +0800)
committerJeremy Kerr <jk@ozlabs.org>
Thu, 5 Dec 2013 06:42:14 +0000 (14:42 +0800)
In commit 823958fb, we change to use struct process, but left in the
check for rc == BOOT_HOOK_EXIT_UPDATE. We actually want to check
process->exit_status here, not rc.

Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
discover/boot.c

index 13dfe0c9781fc5be889e48e34340cbb4e952aecd..83bcc7bfe8ce5c2b96d54f537d689fe21ebb4a9e 100644 (file)
@@ -266,11 +266,9 @@ static void run_boot_hooks(struct boot_task *task)
                        /* if the hook returned with BOOT_HOOK_EXIT_UPDATE,
                         * then we process stdout to look for updated params
                         */
-                       if (rc == BOOT_HOOK_EXIT_UPDATE) {
-                               boot_hook_update(task, hooks[i]->d_name,
-                                               process->stdout_buf);
-                               boot_hook_setenv(task);
-                       }
+                       boot_hook_update(task, hooks[i]->d_name,
+                                       process->stdout_buf);
+                       boot_hook_setenv(task);
                }
 
                process_release(process);