dmi: dmicheck: add chassis type for Type 3

Message ID 1519873627-25526-1-git-send-email-alex.hung@canonical.com
State Accepted
Headers show
Series
  • dmi: dmicheck: add chassis type for Type 3
Related show

Commit Message

Alex Hung March 1, 2018, 3:07 a.m.
4 types are added: IoT Gateway, Embedded PC, Mini PC and Stick PC

Signed-off-by: Alex Hung <alex.hung@canonical.com>
---
 src/dmi/dmicheck/dmicheck.c   | 4 ++++
 src/lib/include/fwts_smbios.h | 4 ++++
 2 files changed, 8 insertions(+)

Comments

ivanhu March 14, 2018, 9:21 a.m. | #1
On 03/01/2018 11:07 AM, Alex Hung wrote:
> 4 types are added: IoT Gateway, Embedded PC, Mini PC and Stick PC
> 
> Signed-off-by: Alex Hung <alex.hung@canonical.com>
> ---
>   src/dmi/dmicheck/dmicheck.c   | 4 ++++
>   src/lib/include/fwts_smbios.h | 4 ++++
>   2 files changed, 8 insertions(+)
> 
> diff --git a/src/dmi/dmicheck/dmicheck.c b/src/dmi/dmicheck/dmicheck.c
> index 8d3ca5a..5965155 100644
> --- a/src/dmi/dmicheck/dmicheck.c
> +++ b/src/dmi/dmicheck/dmicheck.c
> @@ -246,6 +246,10 @@ static const fwts_chassis_type_map fwts_dmi_chassis_type[] = {
>   	{ "Tablet",		FWTS_SMBIOS_CHASSIS_TABLET },
>   	{ "Convertible",	FWTS_SMBIOS_CHASSIS_CONVERTIBLE },
>   	{ "Detachable",		FWTS_SMBIOS_CHASSIS_DETACHABLE },
> +	{ "IoT Gateway",	FWTS_SMBIOS_CHASSIS_IOT_GATEWAY },
> +	{ "Embedded PC",	FWTS_SMBIOS_CHASSIS_EMBEDDED_PC },
> +	{ "Mini PC",		FWTS_SMBIOS_CHASSIS_MINI_PC },
> +	{ "Stick PC",		FWTS_SMBIOS_CHASSIS_STICK_PC },
>   };
>   
>   /* Remapping table from buggy version numbers to correct values */
> diff --git a/src/lib/include/fwts_smbios.h b/src/lib/include/fwts_smbios.h
> index 2abc027..a8bbf08 100644
> --- a/src/lib/include/fwts_smbios.h
> +++ b/src/lib/include/fwts_smbios.h
> @@ -60,6 +60,10 @@
>   #define FWTS_SMBIOS_CHASSIS_TABLET			(0x1E)
>   #define FWTS_SMBIOS_CHASSIS_CONVERTIBLE			(0x1F)
>   #define FWTS_SMBIOS_CHASSIS_DETACHABLE			(0x20)
> +#define FWTS_SMBIOS_CHASSIS_IOT_GATEWAY			(0x21)
> +#define FWTS_SMBIOS_CHASSIS_EMBEDDED_PC			(0x22)
> +#define FWTS_SMBIOS_CHASSIS_MINI_PC			(0x23)
> +#define FWTS_SMBIOS_CHASSIS_STICK_PC			(0x24)
>   
>   typedef enum {
>   	FWTS_SMBIOS_UNKNOWN = -1,
> 

Acked-by: Ivan Hu <ivan.hu@canonical.com>
Colin Ian King March 14, 2018, 6:36 p.m. | #2
On 01/03/18 03:07, Alex Hung wrote:
> 4 types are added: IoT Gateway, Embedded PC, Mini PC and Stick PC
> 
> Signed-off-by: Alex Hung <alex.hung@canonical.com>
> ---
>  src/dmi/dmicheck/dmicheck.c   | 4 ++++
>  src/lib/include/fwts_smbios.h | 4 ++++
>  2 files changed, 8 insertions(+)
> 
> diff --git a/src/dmi/dmicheck/dmicheck.c b/src/dmi/dmicheck/dmicheck.c
> index 8d3ca5a..5965155 100644
> --- a/src/dmi/dmicheck/dmicheck.c
> +++ b/src/dmi/dmicheck/dmicheck.c
> @@ -246,6 +246,10 @@ static const fwts_chassis_type_map fwts_dmi_chassis_type[] = {
>  	{ "Tablet",		FWTS_SMBIOS_CHASSIS_TABLET },
>  	{ "Convertible",	FWTS_SMBIOS_CHASSIS_CONVERTIBLE },
>  	{ "Detachable",		FWTS_SMBIOS_CHASSIS_DETACHABLE },
> +	{ "IoT Gateway",	FWTS_SMBIOS_CHASSIS_IOT_GATEWAY },
> +	{ "Embedded PC",	FWTS_SMBIOS_CHASSIS_EMBEDDED_PC },
> +	{ "Mini PC",		FWTS_SMBIOS_CHASSIS_MINI_PC },
> +	{ "Stick PC",		FWTS_SMBIOS_CHASSIS_STICK_PC },
>  };
>  
>  /* Remapping table from buggy version numbers to correct values */
> diff --git a/src/lib/include/fwts_smbios.h b/src/lib/include/fwts_smbios.h
> index 2abc027..a8bbf08 100644
> --- a/src/lib/include/fwts_smbios.h
> +++ b/src/lib/include/fwts_smbios.h
> @@ -60,6 +60,10 @@
>  #define FWTS_SMBIOS_CHASSIS_TABLET			(0x1E)
>  #define FWTS_SMBIOS_CHASSIS_CONVERTIBLE			(0x1F)
>  #define FWTS_SMBIOS_CHASSIS_DETACHABLE			(0x20)
> +#define FWTS_SMBIOS_CHASSIS_IOT_GATEWAY			(0x21)
> +#define FWTS_SMBIOS_CHASSIS_EMBEDDED_PC			(0x22)
> +#define FWTS_SMBIOS_CHASSIS_MINI_PC			(0x23)
> +#define FWTS_SMBIOS_CHASSIS_STICK_PC			(0x24)
>  
>  typedef enum {
>  	FWTS_SMBIOS_UNKNOWN = -1,
> 

Thanks Alex.

Acked-by: Colin Ian King <colin.king@canonical.com>

Patch

diff --git a/src/dmi/dmicheck/dmicheck.c b/src/dmi/dmicheck/dmicheck.c
index 8d3ca5a..5965155 100644
--- a/src/dmi/dmicheck/dmicheck.c
+++ b/src/dmi/dmicheck/dmicheck.c
@@ -246,6 +246,10 @@  static const fwts_chassis_type_map fwts_dmi_chassis_type[] = {
 	{ "Tablet",		FWTS_SMBIOS_CHASSIS_TABLET },
 	{ "Convertible",	FWTS_SMBIOS_CHASSIS_CONVERTIBLE },
 	{ "Detachable",		FWTS_SMBIOS_CHASSIS_DETACHABLE },
+	{ "IoT Gateway",	FWTS_SMBIOS_CHASSIS_IOT_GATEWAY },
+	{ "Embedded PC",	FWTS_SMBIOS_CHASSIS_EMBEDDED_PC },
+	{ "Mini PC",		FWTS_SMBIOS_CHASSIS_MINI_PC },
+	{ "Stick PC",		FWTS_SMBIOS_CHASSIS_STICK_PC },
 };
 
 /* Remapping table from buggy version numbers to correct values */
diff --git a/src/lib/include/fwts_smbios.h b/src/lib/include/fwts_smbios.h
index 2abc027..a8bbf08 100644
--- a/src/lib/include/fwts_smbios.h
+++ b/src/lib/include/fwts_smbios.h
@@ -60,6 +60,10 @@ 
 #define FWTS_SMBIOS_CHASSIS_TABLET			(0x1E)
 #define FWTS_SMBIOS_CHASSIS_CONVERTIBLE			(0x1F)
 #define FWTS_SMBIOS_CHASSIS_DETACHABLE			(0x20)
+#define FWTS_SMBIOS_CHASSIS_IOT_GATEWAY			(0x21)
+#define FWTS_SMBIOS_CHASSIS_EMBEDDED_PC			(0x22)
+#define FWTS_SMBIOS_CHASSIS_MINI_PC			(0x23)
+#define FWTS_SMBIOS_CHASSIS_STICK_PC			(0x24)
 
 typedef enum {
 	FWTS_SMBIOS_UNKNOWN = -1,