Patchwork dmi: dmi_decode: Add checks for frequent bad defaults on AMI firmware

login
register
mail settings
Submitter Colin King
Date May 29, 2013, 3:09 p.m.
Message ID <1369840149-23690-1-git-send-email-colin.king@canonical.com>
Download mbox | patch
Permalink /patch/247283/
State Accepted
Headers show

Comments

Colin King - May 29, 2013, 3:09 p.m.
From: Colin Ian King <colin.king@canonical.com>

Add checks for some common bad default strings that are see on a
range of AMI firmware.

Signed-off-by: Colin Ian King <colin.king@canonical.com>
---
 src/dmi/dmi_decode/dmi_decode.c | 6 ++++++
 1 file changed, 6 insertions(+)
Ivan Hu - May 31, 2013, 7:48 a.m.
On 05/29/2013 11:09 PM, Colin King wrote:
> From: Colin Ian King <colin.king@canonical.com>
>
> Add checks for some common bad default strings that are see on a
> range of AMI firmware.
>
> Signed-off-by: Colin Ian King <colin.king@canonical.com>
> ---
>   src/dmi/dmi_decode/dmi_decode.c | 6 ++++++
>   1 file changed, 6 insertions(+)
>
> diff --git a/src/dmi/dmi_decode/dmi_decode.c b/src/dmi/dmi_decode/dmi_decode.c
> index d89ab28..acdf333 100644
> --- a/src/dmi/dmi_decode/dmi_decode.c
> +++ b/src/dmi/dmi_decode/dmi_decode.c
> @@ -87,7 +87,13 @@ typedef struct {
>   static const fwts_dmi_pattern dmi_patterns[] = {
>   	{ "DMISerialNumber",	"Serial Number", 	"0123456789" },
>   	{ "DMISerialNumber",	"Serial Number", 	"System Serial Number" },
> +	{ "DMISerialNumber",	"Serial Number",	"MB-1234567890" },
> +	{ "DMISerialNumber",	NULL,			"Chassis Serial Number" },
>   	{ "DMIAssetTag",	"Asset Tag",		"1234567890" },
> +	{ "DMIAssetTag",	"Asset Tag",		"Asset-1234567890" },
> +	{ "DMIChassisVendor",	NULL,			"Chassis Manufacture" },
> +	{ "DMIChassisVersion",	NULL,			"Chassis Version" },
> +	{ "DMIProductVersion",	NULL,			"System Version" },
>   	{ "DMIBadDefault",	NULL,			"To Be Filled By O.E.M." },
>   	{ NULL,			NULL,			NULL }
>   };
>

Acked-by: Ivan Hu <ivan.hu@canonical.com>
Keng-Yu Lin - June 3, 2013, 2:45 a.m.
On Fri, May 31, 2013 at 3:48 PM, IvanHu <ivan.hu@canonical.com> wrote:
> On 05/29/2013 11:09 PM, Colin King wrote:
>>
>> From: Colin Ian King <colin.king@canonical.com>
>>
>> Add checks for some common bad default strings that are see on a
>> range of AMI firmware.
>>
>> Signed-off-by: Colin Ian King <colin.king@canonical.com>
>> ---
>>   src/dmi/dmi_decode/dmi_decode.c | 6 ++++++
>>   1 file changed, 6 insertions(+)
>>
>> diff --git a/src/dmi/dmi_decode/dmi_decode.c
>> b/src/dmi/dmi_decode/dmi_decode.c
>> index d89ab28..acdf333 100644
>> --- a/src/dmi/dmi_decode/dmi_decode.c
>> +++ b/src/dmi/dmi_decode/dmi_decode.c
>> @@ -87,7 +87,13 @@ typedef struct {
>>   static const fwts_dmi_pattern dmi_patterns[] = {
>>         { "DMISerialNumber",    "Serial Number",        "0123456789" },
>>         { "DMISerialNumber",    "Serial Number",        "System Serial
>> Number" },
>> +       { "DMISerialNumber",    "Serial Number",        "MB-1234567890" },
>> +       { "DMISerialNumber",    NULL,                   "Chassis Serial
>> Number" },
>>         { "DMIAssetTag",        "Asset Tag",            "1234567890" },
>> +       { "DMIAssetTag",        "Asset Tag",            "Asset-1234567890"
>> },
>> +       { "DMIChassisVendor",   NULL,                   "Chassis
>> Manufacture" },
>> +       { "DMIChassisVersion",  NULL,                   "Chassis Version"
>> },
>> +       { "DMIProductVersion",  NULL,                   "System Version"
>> },
>>         { "DMIBadDefault",      NULL,                   "To Be Filled By
>> O.E.M." },
>>         { NULL,                 NULL,                   NULL }
>>   };
>>
>
> Acked-by: Ivan Hu <ivan.hu@canonical.com>
>
Acked-by: Keng-Yu Lin <kengyu@canonical.com>

Patch

diff --git a/src/dmi/dmi_decode/dmi_decode.c b/src/dmi/dmi_decode/dmi_decode.c
index d89ab28..acdf333 100644
--- a/src/dmi/dmi_decode/dmi_decode.c
+++ b/src/dmi/dmi_decode/dmi_decode.c
@@ -87,7 +87,13 @@  typedef struct {
 static const fwts_dmi_pattern dmi_patterns[] = {
 	{ "DMISerialNumber",	"Serial Number", 	"0123456789" },
 	{ "DMISerialNumber",	"Serial Number", 	"System Serial Number" },
+	{ "DMISerialNumber",	"Serial Number",	"MB-1234567890" },
+	{ "DMISerialNumber",	NULL,			"Chassis Serial Number" },
 	{ "DMIAssetTag",	"Asset Tag",		"1234567890" },
+	{ "DMIAssetTag",	"Asset Tag",		"Asset-1234567890" },
+	{ "DMIChassisVendor",	NULL,			"Chassis Manufacture" },
+	{ "DMIChassisVersion",	NULL,			"Chassis Version" },
+	{ "DMIProductVersion",	NULL,			"System Version" },
 	{ "DMIBadDefault",	NULL,			"To Be Filled By O.E.M." },
 	{ NULL,			NULL,			NULL }
 };