Fixing wrong offsets in dmi
authorSebastian Herbszt <herbszt@gmx.de>
Sat, 8 Mar 2008 21:56:53 +0000 (22:56 +0100)
committerH. Peter Anvin <hpa@zytor.com>
Thu, 20 Mar 2008 23:34:36 +0000 (16:34 -0700)
DMI code have some wrong offsets.
This patch fixes this offsets and improve the grammar.

Signed-off-by: Sebastian Herbszt <herbszt@gmx.de>
com32/include/dmi/dmi_bios.h
com32/modules/dmi_utils.c

index d9be233..0241f0b 100644 (file)
@@ -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;
index 83b50d8..df03ba7 100644 (file)
 
 void display_bios_characteristics(s_dmi *dmi) {
 int i;
-  for (i=0;i<=BIOS_CHAR_NB_ELEMENTS; i++) {
+  for (i=0;i<BIOS_CHAR_NB_ELEMENTS; i++) {
         if (((bool *)(& dmi->bios.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;i<BIOS_CHAR_X1_NB_ELEMENTS; i++) {
         if (((bool *)(& dmi->bios.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;i<BIOS_CHAR_X2_NB_ELEMENTS; i++) {
         if (((bool *)(& dmi->bios.characteristics_x2))[i] == true) {
                moreprintf("\t\t%s\n", bios_charac_x2_strings[i]);
                 }