From e24088d7308039a4afad734087349410991bf4b2 Mon Sep 17 00:00:00 2001 From: Sebastian Herbszt Date: Sat, 8 Mar 2008 22:56:53 +0100 Subject: [PATCH] Fixing wrong offsets in dmi DMI code have some wrong offsets. This patch fixes this offsets and improve the grammar. Signed-off-by: Sebastian Herbszt --- com32/include/dmi/dmi_bios.h | 14 +++++++------- com32/modules/dmi_utils.c | 6 +++--- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/com32/include/dmi/dmi_bios.h b/com32/include/dmi/dmi_bios.h index d9be233..0241f0b 100644 --- a/com32/include/dmi/dmi_bios.h +++ b/com32/include/dmi/dmi_bios.h @@ -22,7 +22,7 @@ #define BIOS_BIOS_REVISION_SIZE 16 #define BIOS_FIRMWARE_REVISION_SIZE 16 -#define BIOS_CHAR_NB_ELEMENTS 27 +#define BIOS_CHAR_NB_ELEMENTS 28 #define BIOS_CHAR_X1_NB_ELEMENTS 8 #define BIOS_CHAR_X2_NB_ELEMENTS 3 @@ -58,8 +58,8 @@ static const char *bios_charac_strings[]={ "NEC PC-98" /* 31 */ }; -/* this struct have BIOS_CHAR_NB_ELEMENTS */ -/* each bool is associated to the relevant message above */ +/* this struct has BIOS_CHAR_NB_ELEMENTS */ +/* each bool is associated with the relevant message above */ typedef struct { bool bios_characteristics_not_supported; bool isa; @@ -102,8 +102,8 @@ static const char *bios_charac_x1_strings[]={ "Smart battery is supported" /* 7 */ }; -/* this struct have BIOS_CHAR_X1_NB_ELEMENTS */ -/* each bool is associated to the relevant message above */ +/* this struct has BIOS_CHAR_X1_NB_ELEMENTS */ +/* each bool is associated with the relevant message above */ typedef struct { bool acpi; bool usb_legacy; @@ -121,8 +121,8 @@ static const char *bios_charac_x2_strings[]={ "Targeted content distribution is supported" /* 2 */ }; -/* this struct have BIOS_CHAR_X2_NB_ELEMENTS */ -/* each bool is associated to the relevant message above */ +/* this struct has BIOS_CHAR_X2_NB_ELEMENTS */ +/* each bool is associated with the relevant message above */ typedef struct { bool bios_boot_specification; bool bios_network_boot_by_keypress; diff --git a/com32/modules/dmi_utils.c b/com32/modules/dmi_utils.c index 83b50d8..df03ba7 100644 --- a/com32/modules/dmi_utils.c +++ b/com32/modules/dmi_utils.c @@ -31,18 +31,18 @@ void display_bios_characteristics(s_dmi *dmi) { int i; - for (i=0;i<=BIOS_CHAR_NB_ELEMENTS; i++) { + for (i=0;ibios.characteristics))[i] == true) { moreprintf("\t\t%s\n", bios_charac_strings[i]); } } - for (i=0;i<=BIOS_CHAR_X1_NB_ELEMENTS; i++) { + for (i=0;ibios.characteristics_x1))[i] == true) { moreprintf("\t\t%s\n", bios_charac_x1_strings[i]); } } - for (i=0;i<=BIOS_CHAR_X2_NB_ELEMENTS; i++) { + for (i=0;ibios.characteristics_x2))[i] == true) { moreprintf("\t\t%s\n", bios_charac_x2_strings[i]); } -- 2.7.4