image-host: fix 'unknown error' error message
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>
diff --git a/tools/image-host.c b/tools/image-host.c
index 49ce743..5e01b85 100644
--- a/tools/image-host.c
+++ b/tools/image-host.c
@@ -1333,7 +1333,7 @@
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;
}
}