summaryrefslogtreecommitdiff
path: root/payloads/libpayload/include/libpayload.h
diff options
context:
space:
mode:
authorMathias Krause <mathias.krause@secunet.com>2012-02-17 12:02:47 +0100
committerStefan Reinauer <stefan.reinauer@coreboot.org>2012-02-17 19:26:59 +0100
commitd6a6eefebe970302964435516aa7f6866142df52 (patch)
tree717e8892eb52807ce88b5a9ea544e203da1df58b /payloads/libpayload/include/libpayload.h
parent334328a51f8ec04e6fb4a774198c8f9db7c5ef2d (diff)
downloadcoreboot-d6a6eefebe970302964435516aa7f6866142df52.tar.xz
libpayload: enforce const correctness for CMOS getter/setter
Input only arguments to {get,set}_option*() should be const to catch programming errors early. Change-Id: I560001a8e9226dfd156a4e529fcad20549236ebd Signed-off-by: Mathias Krause <mathias.krause@secunet.com> Reviewed-on: http://review.coreboot.org/652 Tested-by: build bot (Jenkins) Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
Diffstat (limited to 'payloads/libpayload/include/libpayload.h')
-rw-r--r--payloads/libpayload/include/libpayload.h14
1 files changed, 7 insertions, 7 deletions
diff --git a/payloads/libpayload/include/libpayload.h b/payloads/libpayload/include/libpayload.h
index 53d6672a19..c67c659684 100644
--- a/payloads/libpayload/include/libpayload.h
+++ b/payloads/libpayload/include/libpayload.h
@@ -208,13 +208,13 @@ void fix_options_checksum_with(const struct nvram_accessor *nvram);
void fix_options_checksum(void);
struct cb_cmos_entries *first_cmos_entry(struct cb_cmos_option_table *option_table);
struct cb_cmos_entries *next_cmos_entry(struct cb_cmos_entries *cur);
-int get_option_with(const struct nvram_accessor *nvram, struct cb_cmos_option_table *option_table, void *dest, char *name);
-int get_option_from(struct cb_cmos_option_table *option_table, void *dest, char *name);
-int get_option(void *dest, char *name);
-int set_option_with(const struct nvram_accessor *nvram, struct cb_cmos_option_table *option_table, void *value, char *name);
-int set_option(void *value, char *name);
-int get_option_as_string(const struct nvram_accessor *nvram, struct cb_cmos_option_table *option_table, char **dest, char *name);
-int set_option_from_string(const struct nvram_accessor *nvram, struct cb_cmos_option_table *option_table, char *value, char *name);
+int get_option_with(const struct nvram_accessor *nvram, struct cb_cmos_option_table *option_table, void *dest, const char *name);
+int get_option_from(struct cb_cmos_option_table *option_table, void *dest, const char *name);
+int get_option(void *dest, const char *name);
+int set_option_with(const struct nvram_accessor *nvram, struct cb_cmos_option_table *option_table, const void *value, const char *name);
+int set_option(const void *value, const char *name);
+int get_option_as_string(const struct nvram_accessor *nvram, struct cb_cmos_option_table *option_table, char **dest, const char *name);
+int set_option_from_string(const struct nvram_accessor *nvram, struct cb_cmos_option_table *option_table, const char *value, const char *name);
/**
* @defgroup console Console functions