discover/yaboot: Clear globals_done when we see an image definition
[petitboot] / discover / yaboot-parser.c
index f16ac723ff4b7a7f672616d9bd7c96efd9eadb1a..eaefbf0041572cfbcd7dd3fdf3a376d7bd657718 100644 (file)
@@ -1,4 +1,6 @@
-#define _GNU_SOURCE
+#if defined(HAVE_CONFIG_H)
+#include "config.h"
+#endif
 
 #include <assert.h>
 #include <stdlib.h>
@@ -195,11 +197,10 @@ static void yaboot_process_pair(struct conf_context *conf, const char *name,
        if (!conf_param_in_list(state->known_names, name))
                return;
 
-       state->globals_done = 1;
-
        /* image */
-
        if (streq(name, "image")) {
+               /* an image section finishes our global defintions */
+               state->globals_done = 1;
 
                /* First finish any previous image. */
                if (opt)