diff options
Diffstat (limited to 'commands/boot.c')
-rw-r--r-- | commands/boot.c | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/commands/boot.c b/commands/boot.c index d7795bde72..18f4e36ec7 100644 --- a/commands/boot.c +++ b/commands/boot.c @@ -97,19 +97,16 @@ static int do_boot(int argc, char *argv[]) if (list_empty(&entries->entries)) { printf("Nothing bootable found\n"); - return COMMAND_ERROR; - } - - if (do_list) { - bootsources_list(entries); + ret = COMMAND_ERROR; goto out; } - if (do_menu) { + if (do_list) + bootsources_list(entries); + else if (do_menu) bootsources_menu(entries, timeout); - goto out; - } + ret = 0; out: bootentries_free(entries); free(freep); |