diff options
author | Angel Pons <th3fanbus@gmail.com> | 2021-04-26 17:10:28 +0200 |
---|---|---|
committer | Felix Held <felix-coreboot@felixheld.de> | 2021-05-06 14:48:15 +0000 |
commit | 88dcb3179b4b78a2376609577ae4dd4327fb59c7 (patch) | |
tree | 9c1ae01959fb4d084ea30893a196687c7b611fff /src/include | |
parent | a2cf34129fb3b2a9302bb7cf06e4ee758b9bb85a (diff) |
src: Retype option API to use unsigned integers
The CMOS option system does not support negative integers. Thus, retype
and rename the option API functions to reflect this.
Change-Id: Id3480e5cfc0ec90674def7ef0919e0b7ac5b19b3
Signed-off-by: Angel Pons <th3fanbus@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/52672
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Patrick Rudolph <siro@das-labor.org>
Reviewed-by: Nico Huber <nico.h@gmx.de>
Reviewed-by: Felix Singer <felixsinger@posteo.net>
Diffstat (limited to 'src/include')
-rw-r--r-- | src/include/option.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/include/option.h b/src/include/option.h index 4de032bd49..e7db02e88a 100644 --- a/src/include/option.h +++ b/src/include/option.h @@ -10,7 +10,7 @@ void sanitize_cmos(void); enum cb_err cmos_set_option(const char *name, void *val); enum cb_err cmos_get_option(void *dest, const char *name); -static inline enum cb_err set_int_option(const char *name, int value) +static inline enum cb_err set_uint_option(const char *name, unsigned int value) { if (CONFIG(USE_OPTION_TABLE)) return cmos_set_option(name, &value); @@ -18,10 +18,10 @@ static inline enum cb_err set_int_option(const char *name, int value) return CB_CMOS_OTABLE_DISABLED; } -static inline int get_int_option(const char *name, const int fallback) +static inline int get_uint_option(const char *name, const unsigned int fallback) { if (CONFIG(USE_OPTION_TABLE)) { - int value = 0; + unsigned int value = 0; if (cmos_get_option(&value, name) == CB_SUCCESS) return value; } |