]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
image-host: fix 'unknown error' error message
authorAlexander Kochetkov <al.kochet@gmail.com>
Mon, 16 Sep 2024 08:24:45 +0000 (11:24 +0300)
committerSimon Glass <sjg@chromium.org>
Fri, 18 Oct 2024 20:10:22 +0000 (14:10 -0600)
Fix error message like this:
Can't add verification data for node 'fdt-1' (<unknown error>)

We get unknown error because we decode error as fdt error
but actually it is system error.

Signed-off-by: Alexander Kochetkov <al.kochet@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
tools/image-host.c

index 49ce7436bb975a6fdbf65886a5a6cea3c825086a..5e01b853c502cf0943a2432f64f3f0f72359a044 100644 (file)
@@ -1333,7 +1333,7 @@ int fit_add_verification_data(const char *keydir, const char *keyfile,
                if (ret) {
                        fprintf(stderr, "Can't add verification data for node '%s' (%s)\n",
                                fdt_get_name(fit, noffset, NULL),
-                               fdt_strerror(ret));
+                               strerror(-ret));
                        return ret;
                }
        }