summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2017-08-03 12:22:16 -0600
committerTom Rini <trini@konsulko.com>2017-08-16 08:31:24 -0400
commit21f639446d6bccb6cc550140d36bd3ebd74fcee8 (patch)
treece0d9c8f4f27a05d86ab42bb727221b6fe4046df /include
parent723806cc5bea9f8b37323dfd7568603f99af6a06 (diff)
env: Adjust the get_char() method to return an int
In principle this can fail, e.g. if the index is out of range. Adjust the driver signature to allow returning an error code. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
Diffstat (limited to 'include')
-rw-r--r--include/environment.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/include/environment.h b/include/environment.h
index 9a44215235..ba8af28414 100644
--- a/include/environment.h
+++ b/include/environment.h
@@ -227,9 +227,9 @@ struct env_driver {
* will read from gd->env_addr.
*
* @index: Index of character to read (0=first)
- * @return character read
+ * @return character read, or -ve on error
*/
- unsigned char (*get_char)(int index);
+ int (*get_char)(int index);
/**
* load() - Load the environment from storage