Sebastian Herbszt
2009-Apr-10 19:55 UTC
[syslinux] [RESEND][PATCH] gpllib: dmi: set default memory speed to "Unknown"
The speed value is available since version 2.3 of the SMBIOS specification. Set the default speed string to "Unknown" for older versions. - Sebastian Index: syslinux-3.74-20-g3b80c26/com32/gpllib/dmi/dmi.c ==================================================================--- syslinux-3.74-20-g3b80c26.orig/com32/gpllib/dmi/dmi.c +++ syslinux-3.74-20-g3b80c26/com32/gpllib/dmi/dmi.c @@ -496,6 +496,7 @@ void dmi_decode(struct dmi_header *h, ui if (h->length < 0x15) break; dmi->memory_count++; s_memory *mem = &dmi->memory[dmi->memory_count-1]; + sprintf(mem->speed, "%s", "Unknown"); dmi->memory[dmi->memory_count-1].filled=true; dmi_memory_array_error_handle(WORD(data + 0x06),mem->error); dmi_memory_device_width(WORD(data + 0x08),mem->total_width);
Sebastian Herbszt
2009-May-09 20:05 UTC
[syslinux] [RESEND][PATCH] gpllib: dmi: set default memory speed to"Unknown"
Sebastian Herbszt wrote:> The speed value is available since version 2.3 of the SMBIOS specification. > Set the default speed string to "Unknown" for older versions. > > - Sebastian > > Index: syslinux-3.74-20-g3b80c26/com32/gpllib/dmi/dmi.c > ==================================================================> --- syslinux-3.74-20-g3b80c26.orig/com32/gpllib/dmi/dmi.c > +++ syslinux-3.74-20-g3b80c26/com32/gpllib/dmi/dmi.c > @@ -496,6 +496,7 @@ void dmi_decode(struct dmi_header *h, ui > if (h->length < 0x15) break; > dmi->memory_count++; > s_memory *mem = &dmi->memory[dmi->memory_count-1]; > + sprintf(mem->speed, "%s", "Unknown"); > dmi->memory[dmi->memory_count-1].filled=true; > dmi_memory_array_error_handle(WORD(data + 0x06),mem->error); > dmi_memory_device_width(WORD(data + 0x08),mem->total_width); >Erwan, anything wrong with this one? - Sebastian
Pierre-Alexandre Meyer
2009-May-11 15:11 UTC
[syslinux] [RESEND][PATCH] gpllib: dmi: set default memory speed to "Unknown"
On Friday 10 April 2009 ? 09:55:24PM, Sebastian Herbszt wrote:> The speed value is available since version 2.3 of the SMBIOS specification. > Set the default speed string to "Unknown" for older versions. > > - Sebastian > > Index: syslinux-3.74-20-g3b80c26/com32/gpllib/dmi/dmi.c > ==================================================================> --- syslinux-3.74-20-g3b80c26.orig/com32/gpllib/dmi/dmi.c > +++ syslinux-3.74-20-g3b80c26/com32/gpllib/dmi/dmi.c > @@ -496,6 +496,7 @@ void dmi_decode(struct dmi_header *h, ui > if (h->length < 0x15) break; > dmi->memory_count++; > s_memory *mem = &dmi->memory[dmi->memory_count-1]; > + sprintf(mem->speed, "%s", "Unknown"); > dmi->memory[dmi->memory_count-1].filled=true; > dmi_memory_array_error_handle(WORD(data + 0x06),mem->error); > dmi_memory_device_width(WORD(data + 0x08),mem->total_width);This is taken care of in dmi_memory_device_speed() if length >= 0x17. We have the same issue for other 2.3+ fields (serial, manufacturer, ...). Wondering if it wouldn't be better to initialize globally all fields elsewhere. What does dmidecode do? -- Pierre-Alexandre Meyer
Reasonably Related Threads
- [PATCH 1/1] lua: Cleaned up the dmi table structure in Lua.c32 and added all missing DMI subtables
- [PATCH 3/6] gpllib: fix sizeof(char *) misuse
- [PATCH] hdt: only display MAC address for network cards
- [PATCH xf86-video-nouveau] Properly cleanup fb for reverse-prime-offload
- [PATCH] adapt to HAS_DIRTYTRACKING_DRAWABLE_SRC changes