summaryrefslogtreecommitdiff
path: root/include/bootstage.h
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2017-05-22 11:05:33 (GMT)
committerTom Rini <trini@konsulko.com>2017-06-05 18:13:08 (GMT)
commite003310a76211c2a9bb1939db4633830594c35ba (patch)
tree3ca4d256dddc928717e797e5d7433c04cd5dd097 /include/bootstage.h
parent63c5bf48d5e09317aa3444d2bd51f67d50adb715 (diff)
downloadu-boot-e003310a76211c2a9bb1939db4633830594c35ba.tar.xz
bootstage: Tidy up error return values
We should return a proper error number instead of just -1. This helps the caller to determine what when wrong. Update a few functions to fix this. Signed-off-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'include/bootstage.h')
-rw-r--r--include/bootstage.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/include/bootstage.h b/include/bootstage.h
index 9c7b515..848769b 100644
--- a/include/bootstage.h
+++ b/include/bootstage.h
@@ -329,7 +329,9 @@ int bootstage_stash(void *base, int size);
*
* @param base Base address of memory buffer
* @param size Size of memory buffer (-1 if unknown)
- * @return 0 if unstashed ok, -1 if bootstage info not found, or out of space
+ * @return 0 if unstashed ok, -ENOENT if bootstage info not found, -ENOSPC if
+ * there is not space for read the stacked data, or other error if
+ * something else went wrong
*/
int bootstage_unstash(void *base, int size);