]> git.ipfire.org Git - thirdparty/u-boot.git/commitdiff
boot/fit: print error name in boot_get_fdt_fit()
authorDavid Lechner <dlechner@baylibre.com>
Thu, 29 Jan 2026 20:03:41 +0000 (14:03 -0600)
committerTom Rini <trini@konsulko.com>
Fri, 30 Jan 2026 18:38:03 +0000 (12:38 -0600)
Print the actual error code in a couple of places in boot_get_fdt_fit().

These are FDT error codes, not errno, so printing the string is more
helpful than printing the numeric value.

The only caller of boot_get_fdt_fit() unconditionally replaces the
returned error code (fdt_noffset) with ENOENT so the actual error would
otherwise be lost.

Signed-off-by: David Lechner <dlechner@baylibre.com>
boot/image-fit.c

index 85026c2d1d02aa1845efa28ca5e3519cb0204c97..3ed69b5f7bc8338b97e710cba1f77a3ded6fda70 100644 (file)
@@ -2501,7 +2501,8 @@ int boot_get_fdt_fit(struct bootm_headers *images, ulong addr,
 
                err = fdt_open_into(ov, ovcopy, ovcopylen);
                if (err < 0) {
-                       printf("failed on fdt_open_into for DTO\n");
+                       printf("failed on fdt_open_into for DTO: %s\n",
+                              fdt_strerror(err));
                        fdt_noffset = err;
                        goto out;
                }
@@ -2509,7 +2510,8 @@ int boot_get_fdt_fit(struct bootm_headers *images, ulong addr,
                base = map_sysmem(load, len + ovlen);
                err = fdt_open_into(base, base, len + ovlen);
                if (err < 0) {
-                       printf("failed on fdt_open_into\n");
+                       printf("failed on fdt_open_into: %s\n",
+                              fdt_strerror(err));
                        fdt_noffset = err;
                        goto out;
                }