9
0
Fork 0

boot command: Explicitly complain when boot target list is empty

When no targets to boot are found it can happen that the boot command
just returns silently. Explicitly print a message in this case to give
a clue what might went wrong.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
This commit is contained in:
Sascha Hauer 2016-07-22 14:19:51 +02:00
parent 80c5692ff8
commit 13daf78f1f
1 changed files with 5 additions and 0 deletions

View File

@ -77,6 +77,11 @@ static int do_boot(int argc, char *argv[])
free(freep);
}
if (list_empty(&entries->entries)) {
printf("Nothing bootable found\n");
return COMMAND_ERROR;
}
if (do_list) {
bootsources_list(entries);
goto out;