summaryrefslogtreecommitdiff
path: root/src/include
diff options
context:
space:
mode:
Diffstat (limited to 'src/include')
-rw-r--r--src/include/option.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/include/option.h b/src/include/option.h
index 6b4e6a9c9c..26cd0d5245 100644
--- a/src/include/option.h
+++ b/src/include/option.h
@@ -26,4 +26,15 @@ static inline enum cb_err get_option(void *dest, const char *name)
return CB_CMOS_OTABLE_DISABLED;
}
+static inline enum cb_err set_int_option(const char *name, int value)
+{
+ return set_option(name, &value);
+}
+
+static inline int get_int_option(const char *name, const int fallback)
+{
+ int value = 0;
+ return get_option(&value, name) == CB_SUCCESS ? value : fallback;
+}
+
#endif /* _OPTION_H_ */