From 97cf71f1f2f07210bc160d1f04c0b13d5bcd5b74 Mon Sep 17 00:00:00 2001 From: Jeremy Kerr Date: Thu, 5 Dec 2013 14:32:28 +0800 Subject: [PATCH] discover/boot: Fix condition for updating boot params 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 --- discover/boot.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/discover/boot.c b/discover/boot.c index 13dfe0c..83bcc7b 100644 --- a/discover/boot.c +++ b/discover/boot.c @@ -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); -- 2.39.2