Before I send a patch, I wanted to check if anyone knew whether there are any fields in the SMBIOS specification which can be negative? I haven't across any, and the current code for smbiosview prints struct fields with "%d", which can cause large values (such as DIMM sizes) to be printed incorrectly.
Before I send a patch, I wanted to check if anyone knew whether there are any fields in the SMBIOS specification which can be negative? I haven't across any, and the current code for smbiosview prints struct fields with "%d", which can cause large values (such as DIMM sizes) to be printed incorrectly.
I agree only %u / %x, and %lu / %lx should be used, for printing DWORD and QWORD fields from SMBIOS tables (respectively). WORD and BYTE are fine to print with %d, if the output should be decimal.