image: Avoid -ENODATA in host tools
PATCH 1/1 image: Avoid -ENODATA in host tools
Unfortunately -ENODATA is not available in OpenBSD. Use -EBADMSG instead, to indicate a missing timestamp.
Fixes c5819701a3d image: Adjust the workings of fit_check_format()
Signed-off-by Simon Glass <[email protected]>
---
common/image-fit.c | 2 +- include/image.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)
common/image-fit.c +1 -1
@@ -1651,7 +1651,7 @@ int fit_check_format(const void *fit, ulong size)/* mandatory / node 'timestamp' property */ if (!fdt_getprop (fit,0 ,FIT_TIMESTAMP_PROP ,NULL )) {log_debug ("Wrong FIT format: no timestamp\n" ); -return -ENODATA ; +return -EBADMSG ; } }
include/image.h +1 -1
@@ -1158,7 +1158,7 @@ int fit_image_check_comp(const void *fit, int noffset, uint8_t comp);* @fit: pointer to the FIT format image header * @return 0 if OK, -ENOEXEC if not an FDT file, -EINVAL if the full FDT check * failed (e.g. due to bad structure), -ENOMSG if the description is -* missing, -ENODATA if the timestamp is missing, -ENOENT if the /images +* missing, -EBADMSG if the timestamp is missing, -ENOENT if the /images * path is missing */ int fit_check_format (const void *fit,ulong size);
Signature · 1 line
2.30.0.617.g56c4b15f3c-goog
PATCH 1/1 image: Avoid -ENODATA in host tools
Quoted 6 lines
From: Simon Glass <[email protected]>
Date: Wed, 24 Feb 2021 08:50:32 -0500Unfortunately
-ENODATAis not available in OpenBSD. Use-EBADMSGinstead, to indicate a missing timestamp.
Quoted 7 lines
Fixes c5819701a3d image: Adjust the workings of fit_check_format()Signed-off-by Simon Glass <[email protected]>---
common/image-fit.c | 2 +- include/image.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)
Thanks, that works!
Reviewed-by Mark Kettenis <[email protected]>
Quoted 30 lines
common/image-fit.c +1
-1@@ -1651,7 +1651,7 @@ int fit_check_format(const void *fit, ulong size)/* mandatory / node 'timestamp' property */ if (!fdt_getprop (fit,0 ,FIT_TIMESTAMP_PROP ,NULL )) {log_debug ("Wrong FIT format: no timestamp\n" ); -return -ENODATA ; +return -EBADMSG ; } }include/image.h +1
-1@@ -1158,7 +1158,7 @@ int fit_image_check_comp(const void *fit, int noffset, uint8_t comp);* @fit: pointer to the FIT format image header * @return 0 if OK, -ENOEXEC if not an FDT file, -EINVAL if the full FDT check * failed (e.g. due to bad structure), -ENOMSG if the description is -* missing, -ENODATA if the timestamp is missing, -ENOENT if the /images +* missing, -EBADMSG if the timestamp is missing, -ENOENT if the /images * path is missing */ int fit_check_format (const void *fit,ulong size);Signature · 1 line
2.30.0.617.g56c4b15f3c-goog
PATCH 1/1 image: Avoid -ENODATA in host tools
In reply to Simon GlassQuoted 6 lines · Simon Glass
Unfortunately
-ENODATAis not available in OpenBSD. Use-EBADMSGinstead, to indicate a missing timestamp.Fixes c5819701a3d image: Adjust the workings of fit_check_format()Signed-off-by Simon Glass <[email protected]>Reviewed-by Mark Kettenis <[email protected]>
Applied to u-boot/master, thanks!
Signature · 8 lines
Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 659 bytes Desc: not available URL: <https://lists.denx.de/pipermail/u-boot/attachments/20210318/667756fc/attachment.sig>