aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPierre-Alexandre Meyer <pierre@mouraf.org>2009-11-12 20:49:51 -0800
committerPierre-Alexandre Meyer <pierre@mouraf.org>2009-11-12 20:49:51 -0800
commit7940cac5eb15ea2990da85187a5db41d11463739 (patch)
tree79b267fc4efdcd46fdbc10195d4f161696aca8c4
parentddf974948d8a28ef7f2090e7ab20d141f47268b0 (diff)
downloadsyslinux-7940cac5eb15ea2990da85187a5db41d11463739.tar.gz
syslinux-7940cac5eb15ea2990da85187a5db41d11463739.tar.xz
syslinux-7940cac5eb15ea2990da85187a5db41d11463739.zip
dmi: fix DMI type 6 output
Ralf Carl reports some garbage in the DMI type 6 output. It appears that some output formatting wasn't quite right. This should close #22. Signed-off-by: Pierre-Alexandre Meyer <pierre@mouraf.org>
-rw-r--r--com32/gplinclude/dmi/dmi_memory.h6
-rw-r--r--com32/gpllib/dmi/dmi_memory.c6
2 files changed, 6 insertions, 6 deletions
diff --git a/com32/gplinclude/dmi/dmi_memory.h b/com32/gplinclude/dmi/dmi_memory.h
index f9c2b561..e97c5eb7 100644
--- a/com32/gplinclude/dmi/dmi_memory.h
+++ b/com32/gplinclude/dmi/dmi_memory.h
@@ -53,9 +53,9 @@ typedef struct {
char socket_designation[8];
char bank_connections[8];
char speed[8];
-char type[16];
-char installed_size[8];
-char enabled_size[8];
+char type[48];
+char installed_size[48];
+char enabled_size[48];
char error_status[8];
bool filled;
} s_memory_module;
diff --git a/com32/gpllib/dmi/dmi_memory.c b/com32/gpllib/dmi/dmi_memory.c
index 5c747d69..12e6006c 100644
--- a/com32/gpllib/dmi/dmi_memory.c
+++ b/com32/gpllib/dmi/dmi_memory.c
@@ -198,7 +198,7 @@ void dmi_memory_module_types(uint16_t code, const char *sep, char *type)
for(i=0; i<=10; i++)
if(code&(1<<i))
- sprintf(type, "%s%s", sep, types[i]);
+ sprintf(type, "%s%s%s", type, sep, types[i]);
}
}
@@ -242,9 +242,9 @@ void dmi_memory_module_size(uint8_t code, char* size)
}
if(code&0x80)
- sprintf(size, "%s", "(Double-bank Connection)");
+ sprintf(size, "%s %s", size, "(Double-bank Connection)");
else
- sprintf(size, "%s", "(Single-bank Connection)");
+ sprintf(size, "%s %s", size, "(Single-bank Connection)");
}
void dmi_memory_module_error(uint8_t code, const char *prefix, char *error)