Patchwork [RESEND] dmi: dmi_decode: Add another commonly used serial number

login
register
mail settings
Submitter Colin King
Date March 22, 2013, 12:02 p.m.
Message ID <1363953767-10070-1-git-send-email-colin.king@canonical.com>
Download mbox | patch
Permalink /patch/229974/
State Accepted
Headers show

Comments

Colin King - March 22, 2013, 12:02 p.m.
From: Colin Ian King <colin.king@canonical.com>

Some newer systems that we are seeing don't seem to have the
serial number initialised properly and are set to a default
string "System Serial Number" which is meaningless.  Check for this.

Signed-off-by: Colin Ian King <colin.king@canonical.com>
---
 src/dmi/dmi_decode/dmi_decode.c | 1 +
 1 file changed, 1 insertion(+)
Keng-Yu Lin - March 26, 2013, 5:56 a.m.
On Fri, Mar 22, 2013 at 8:02 PM, Colin King <colin.king@canonical.com> wrote:
> From: Colin Ian King <colin.king@canonical.com>
>
> Some newer systems that we are seeing don't seem to have the
> serial number initialised properly and are set to a default
> string "System Serial Number" which is meaningless.  Check for this.
>
> Signed-off-by: Colin Ian King <colin.king@canonical.com>
> ---
>  src/dmi/dmi_decode/dmi_decode.c | 1 +
>  1 file changed, 1 insertion(+)
>
> diff --git a/src/dmi/dmi_decode/dmi_decode.c b/src/dmi/dmi_decode/dmi_decode.c
> index 15b18b2..0e775db 100644
> --- a/src/dmi/dmi_decode/dmi_decode.c
> +++ b/src/dmi/dmi_decode/dmi_decode.c
> @@ -86,6 +86,7 @@ typedef struct {
>
>  static const fwts_dmi_pattern dmi_patterns[] = {
>         { "DMISerialNumber",    "Serial Number",        "0123456789" },
> +       { "DMISerialNumber",    "Serial Number",        "System Serial Number" },
>         { "DMIAssetTag",        "Asset Tag",            "1234567890" },
>         { "DMIBadDefault",      NULL,                   "To Be Filled By O.E.M." },
>         { NULL,                 NULL,                   NULL }
> --
> 1.8.1.2
>
Acked-by: Keng-Yu Lin <kengyu@canonical.com>
Ivan Hu - March 26, 2013, 8:49 a.m.
On 03/22/2013 08:02 PM, Colin King wrote:
> From: Colin Ian King <colin.king@canonical.com>
>
> Some newer systems that we are seeing don't seem to have the
> serial number initialised properly and are set to a default
> string "System Serial Number" which is meaningless.  Check for this.
>
> Signed-off-by: Colin Ian King <colin.king@canonical.com>
> ---
>   src/dmi/dmi_decode/dmi_decode.c | 1 +
>   1 file changed, 1 insertion(+)
>
> diff --git a/src/dmi/dmi_decode/dmi_decode.c b/src/dmi/dmi_decode/dmi_decode.c
> index 15b18b2..0e775db 100644
> --- a/src/dmi/dmi_decode/dmi_decode.c
> +++ b/src/dmi/dmi_decode/dmi_decode.c
> @@ -86,6 +86,7 @@ typedef struct {
>
>   static const fwts_dmi_pattern dmi_patterns[] = {
>   	{ "DMISerialNumber",	"Serial Number", 	"0123456789" },
> +	{ "DMISerialNumber",	"Serial Number", 	"System Serial Number" },
>   	{ "DMIAssetTag",	"Asset Tag",		"1234567890" },
>   	{ "DMIBadDefault",	NULL,			"To Be Filled By O.E.M." },
>   	{ NULL,			NULL,			NULL }
>

Acked-by: Ivan Hu <ivan.hu@canonical.com>

Patch

diff --git a/src/dmi/dmi_decode/dmi_decode.c b/src/dmi/dmi_decode/dmi_decode.c
index 15b18b2..0e775db 100644
--- a/src/dmi/dmi_decode/dmi_decode.c
+++ b/src/dmi/dmi_decode/dmi_decode.c
@@ -86,6 +86,7 @@  typedef struct {
 
 static const fwts_dmi_pattern dmi_patterns[] = {
 	{ "DMISerialNumber",	"Serial Number", 	"0123456789" },
+	{ "DMISerialNumber",	"Serial Number", 	"System Serial Number" },
 	{ "DMIAssetTag",	"Asset Tag",		"1234567890" },
 	{ "DMIBadDefault",	NULL,			"To Be Filled By O.E.M." },
 	{ NULL,			NULL,			NULL }