summaryrefslogtreecommitdiffstats
path: root/discover/grub2/script.c
diff options
context:
space:
mode:
Diffstat (limited to 'discover/grub2/script.c')
-rw-r--r--discover/grub2/script.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/discover/grub2/script.c b/discover/grub2/script.c
index c0d6e1a..239ae38 100644
--- a/discover/grub2/script.c
+++ b/discover/grub2/script.c
@@ -277,10 +277,12 @@ int statement_if_execute(struct grub2_script *script,
bool executed;
int rc;
- conditional = st->conditional;
-
- rc = statement_conditional_execute(script,
- conditional, &executed);
+ list_for_each_entry(&st->conditionals->list, conditional, list) {
+ rc = statement_conditional_execute(script,
+ conditional, &executed);
+ if (executed)
+ break;
+ }
if (!executed && st->else_case)
rc = statements_execute(script, st->else_case);
OpenPOWER on IntegriCloud