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:
parent
80c5692ff8
commit
13daf78f1f
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue