]> git.ipfire.org Git - thirdparty/u-boot.git/commitdiff
common: splash_source: fix cryptic error messages
authorAnshul Dalal <anshuld@ti.com>
Thu, 12 Mar 2026 05:00:12 +0000 (10:30 +0530)
committerTom Rini <trini@konsulko.com>
Sat, 30 May 2026 13:43:41 +0000 (07:43 -0600)
Some error messages emitted while loading the splash image are too
cryptic and don't provide any insights into the failure being a splash
related issue, such as 'Error (-2): cannot determine file size' etc.

This patch fixes the error codes by adding the function name to the
error print.

Signed-off-by: Anshul Dalal <anshuld@ti.com>
[trini: Add missing ',' and wrap to 80-width]
Signed-off-by: Tom Rini <trini@konsulko.com>
common/splash_source.c

index 0710e302ba1ffcf522aad03febfbb6497164d751..e02f9be05e4957e7a96303a6a682bd60fce757c8 100644 (file)
@@ -159,12 +159,12 @@ static int splash_select_fs_dev(struct splash_location *location)
                        res = -ENODEV;
                break;
        default:
-               printf("Error: unsupported location storage.\n");
+               printf("Error: %s: unsupported location storage.\n", __func__);
                return -ENODEV;
        }
 
        if (res)
-               printf("Error: could not access storage.\n");
+               printf("Error: %s: could not access storage.\n", __func__);
 
        return res;
 }
@@ -284,7 +284,8 @@ static int splash_load_fs(struct splash_location *location, ulong bmp_load_addr)
 
        res = fs_size(splash_file, &bmp_size);
        if (res) {
-               printf("Error (%d): cannot determine file size\n", res);
+               printf("Error: %s: cannot determine file size (%d)\n",
+                      __func__, res);
                goto out;
        }