diff options
-rw-r--r-- | commands/boot.c | 18 |
1 files changed, 12 insertions, 6 deletions
diff --git a/commands/boot.c b/commands/boot.c index ce4eeac653..aeaba3992e 100644 --- a/commands/boot.c +++ b/commands/boot.c @@ -90,6 +90,18 @@ static int do_boot(int argc, char *argv[]) ret = bootentry_create_from_name(entries, name); if (ret <= 0) printf("Nothing bootable found on '%s'\n", name); + + if (do_list || do_menu) + continue; + + bootentries_for_each_entry(entries, entry) { + ret = boot_entry(entry, verbose, dryrun); + if (!ret) + break; + } + + bootentries_free(entries); + entries = bootentries_alloc(); } if (list_empty(&entries->entries)) { @@ -107,12 +119,6 @@ static int do_boot(int argc, char *argv[]) goto out; } - bootentries_for_each_entry(entries, entry) { - ret = boot_entry(entry, verbose, dryrun); - if (!ret) - break; - } - out: bootentries_free(entries); free(freep); |