summaryrefslogtreecommitdiffstats
path: root/dmi.c
diff options
context:
space:
mode:
authorMichael Karcher <flashrom@mkarcher.dialup.fu-berlin.de>2010-02-26 09:51:20 +0000
committerMichael Karcher <flashrom@mkarcher.dialup.fu-berlin.de>2010-02-26 09:51:20 +0000
commit8c1df280e344ca4bff76b9061db419bb174c2e4a (patch)
treebcb007bd2f154ed156675411c3aef585dd66ff86 /dmi.c
parent0d7fb7c5ed4dab13b6e94329992862599323ccfc (diff)
downloadast2050-flashrom-8c1df280e344ca4bff76b9061db419bb174c2e4a.zip
ast2050-flashrom-8c1df280e344ca4bff76b9061db419bb174c2e4a.tar.gz
Warn if running on laptops
Corresponding to flashrom svn r916. Signed-off-by: Michael Karcher <flashrom@mkarcher.dialup.fu-berlin.de> Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Diffstat (limited to 'dmi.c')
-rw-r--r--dmi.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/dmi.c b/dmi.c
index a68f210..30a4670 100644
--- a/dmi.c
+++ b/dmi.c
@@ -98,6 +98,7 @@ static char *get_dmi_string(const char *string_name)
void dmi_init(void)
{
int i;
+ char *chassis_type;
has_dmi_support = 1;
for (i = 0; i < DMI_ID_INVALID; i++) {
dmistrings[i] = get_dmi_string(dmidecode_names[i]);
@@ -106,6 +107,13 @@ void dmi_init(void)
break;
}
}
+
+ chassis_type = get_dmi_string("chassis-type");
+ if (chassis_type && !strcmp(chassis_type, "Notebook")) {
+ printf_debug("Laptop detected via DMI");
+ is_laptop = 1;
+ }
+ free(chassis_type);
}
/**
OpenPOWER on IntegriCloud