]> git.ozlabs.org Git - petitboot/blobdiff - discover/boot.c
discover/boot: Fix condition for updating boot params
[petitboot] / discover / boot.c
index 0237b0c962209fe65aa8b2f394946adbc24d656f..83bcc7bfe8ce5c2b96d54f537d689fe21ebb4a9e 100644 (file)
@@ -9,13 +9,13 @@
 #include <fcntl.h>
 #include <sys/types.h>
 
-#include <array-size/array-size.h>
 #include <log/log.h>
 #include <pb-protocol/pb-protocol.h>
 #include <process/process.h>
 #include <system/system.h>
 #include <talloc/talloc.h>
 #include <url/url.h>
+#include <util/util.h>
 
 #include "device-handler.h"
 #include "boot.h"
@@ -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);