diff mbox series

[11/29] image: Document error codes from fit_image_load()

Message ID 20231112000923.73568-12-sjg@chromium.org
State Superseded
Delegated to: Tom Rini
Headers show
Series bootm: Refactoring to reduce reliance on CMDLINE (part A) | expand

Commit Message

Simon Glass Nov. 12, 2023, 12:08 a.m. UTC
Put a list of these in the function documentation so it is easier to
decode what went wrong.

Signed-off-by: Simon Glass <sjg@chromium.org>
---

 include/image.h | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

Comments

Tom Rini Nov. 15, 2023, 10:36 p.m. UTC | #1
On Sat, Nov 11, 2023 at 05:08:56PM -0700, Simon Glass wrote:

> Put a list of these in the function documentation so it is easier to
> decode what went wrong.
> 
> Signed-off-by: Simon Glass <sjg@chromium.org>

Reviewed-by: Tom Rini <trini@konsulko.com>
diff mbox series

Patch

diff --git a/include/image.h b/include/image.h
index 798c5f9c16e4..d37e44721672 100644
--- a/include/image.h
+++ b/include/image.h
@@ -728,7 +728,13 @@  int boot_get_fdt_fit(struct bootm_headers *images, ulong addr,
  * @param load_op	Decribes what to do with the load address
  * @param datap		Returns address of loaded image
  * @param lenp		Returns length of loaded image
- * Return: node offset of image, or -ve error code on error
+ * Return: node offset of image, or -ve error code on error:
+ *   -ENOEXEC - unsupported architecture
+ *   -ENOENT - could not find image / subimage
+ *   -EACCES - hash, signature or decryptions failure
+ *   -EBADF - invalid OS or image type, or cannot get image load-address
+ *   -EXDEV - memory overwritten / overlap
+ *   -NOEXEC - image decompression error, or invalid FDT
  */
 int fit_image_load(struct bootm_headers *images, ulong addr,
 		   const char **fit_unamep, const char **fit_uname_configp,