Skip to content
Snippets Groups Projects
Commit 082b1414 authored by Stefan Agner's avatar Stefan Agner Committed by Simon Glass
Browse files

cmd: fdt: Print error message when fdt application fails


There are lots of reason why a FDT application might fail, the
error code might give an indication. Let the error code translate
in a error string so users can try to understand what went wrong.

Signed-off-by: default avatarStefan Agner <stefan.agner@toradex.com>
Acked-by: default avatarMaxime Ripard <maxime.ripard@free-electrons.com>
Acked-by: default avatarSimon Glass <sjg@chromium.org>
parent 46743c41
No related branches found
No related tags found
No related merge requests found
......@@ -642,6 +642,7 @@ static int do_fdt(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
else if (strncmp(argv[1], "ap", 2) == 0) {
unsigned long addr;
struct fdt_header *blob;
int ret;
if (argc != 3)
return CMD_RET_USAGE;
......@@ -654,8 +655,11 @@ static int do_fdt(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
if (!fdt_valid(&blob))
return CMD_RET_FAILURE;
if (fdt_overlay_apply(working_fdt, blob))
ret = fdt_overlay_apply(working_fdt, blob);
if (ret) {
printf("fdt_overlay_apply(): %s\n", fdt_strerror(ret));
return CMD_RET_FAILURE;
}
}
#endif
/* resize the fdt */
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment