Stefan Reinauer (stefan.reinauer@coreboot.org) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/1729
-gerrit
commit 5cfd3b51dd33253578cb053043fdc64701bc566b Author: Gabe Black gabeblack@google.com Date: Mon Oct 1 18:05:50 2012 -0700
libpayload: Add CB_ prefixes to some constants in coreboot_tables.h.
This makes their names more consistent with other constants in this header, avoids name collisions, and makes it more obvious where the names came from.
Change-Id: I7b8bd4ada0fbaf049f35759a907281265f5bb2e6 Signed-off-by: Gabe Black gabeblack@google.com --- payloads/libpayload/drivers/options.c | 4 ++-- payloads/libpayload/include/coreboot_tables.h | 18 +++++++++--------- 2 files changed, 11 insertions(+), 11 deletions(-)
diff --git a/payloads/libpayload/drivers/options.c b/payloads/libpayload/drivers/options.c index d3ec137..a01f977 100644 --- a/payloads/libpayload/drivers/options.c +++ b/payloads/libpayload/drivers/options.c @@ -155,7 +155,7 @@ static int set_cmos_value(const struct nvram_accessor *nvram, u32 bitnum, u32 le static struct cb_cmos_entries *lookup_cmos_entry(struct cb_cmos_option_table *option_table, const char *name) { struct cb_cmos_entries *cmos_entry; - int len = name ? strnlen(name, CMOS_MAX_NAME_LENGTH) : 0; + int len = name ? strnlen(name, CB_CMOS_MAX_NAME_LENGTH) : 0;
/* cmos entries are located right after the option table */ cmos_entry = first_cmos_entry(option_table); @@ -235,7 +235,7 @@ struct cb_cmos_enums *first_cmos_enum_of_id(struct cb_cmos_option_table *option_ /* Either value or text must be NULL. Returns the field that matches "the other" for a given config_id */ static struct cb_cmos_enums *lookup_cmos_enum_core(struct cb_cmos_option_table *option_table, int config_id, const u8 *value, const char *text) { - int len = strnlen(text, CMOS_MAX_TEXT_LENGTH); + int len = strnlen(text, CB_CMOS_MAX_TEXT_LENGTH);
/* cmos enums are located after cmos entries. */ struct cb_cmos_enums *cmos_enum; diff --git a/payloads/libpayload/include/coreboot_tables.h b/payloads/libpayload/include/coreboot_tables.h index 14f94cf..43fd41b 100644 --- a/payloads/libpayload/include/coreboot_tables.h +++ b/payloads/libpayload/include/coreboot_tables.h @@ -217,7 +217,7 @@ struct cb_cmos_option_table { };
#define CB_TAG_OPTION 0x00c9 -#define CMOS_MAX_NAME_LENGTH 32 +#define CB_CMOS_MAX_NAME_LENGTH 32 struct cb_cmos_entries { u32 tag; u32 size; @@ -225,33 +225,33 @@ struct cb_cmos_entries { u32 length; u32 config; u32 config_id; - u8 name[CMOS_MAX_NAME_LENGTH]; + u8 name[CB_CMOS_MAX_NAME_LENGTH]; };
#define CB_TAG_OPTION_ENUM 0x00ca -#define CMOS_MAX_TEXT_LENGTH 32 +#define CB_CMOS_MAX_TEXT_LENGTH 32 struct cb_cmos_enums { u32 tag; u32 size; u32 config_id; u32 value; - u8 text[CMOS_MAX_TEXT_LENGTH]; + u8 text[CB_CMOS_MAX_TEXT_LENGTH]; };
#define CB_TAG_OPTION_DEFAULTS 0x00cb -#define CMOS_IMAGE_BUFFER_SIZE 128 +#define CB_CMOS_IMAGE_BUFFER_SIZE 128 struct cb_cmos_defaults { u32 tag; u32 size; u32 name_length; - u8 name[CMOS_MAX_NAME_LENGTH]; - u8 default_set[CMOS_IMAGE_BUFFER_SIZE]; + u8 name[CB_CMOS_MAX_NAME_LENGTH]; + u8 default_set[CB_CMOS_IMAGE_BUFFER_SIZE]; };
#define CB_TAG_OPTION_CHECKSUM 0x00cc -#define CHECKSUM_NONE 0 -#define CHECKSUM_PCBIOS 1 +#define CB_CHECKSUM_NONE 0 +#define CB_CHECKSUM_PCBIOS 1 struct cb_cmos_checksum { u32 tag; u32 size;