summaryrefslogtreecommitdiffstats
path: root/internal.c
diff options
context:
space:
mode:
authorStefan Tauner <stefan.tauner@alumni.tuwien.ac.at>2011-07-26 00:54:42 +0000
committerStefan Tauner <stefan.tauner@alumni.tuwien.ac.at>2011-07-26 00:54:42 +0000
commita34d7190377cb085df5346e58405c117dbaede29 (patch)
treecb91d6d51031de7b195f4586549603e3a0e82080 /internal.c
parent46fa068fa21353efe41d9b41092817f7a6f5a4aa (diff)
downloadflashrom-a34d7190377cb085df5346e58405c117dbaede29.tar.gz
flashrom-a34d7190377cb085df5346e58405c117dbaede29.tar.bz2
flashrom-a34d7190377cb085df5346e58405c117dbaede29.zip
Be more refined regarding DMI chassis types
We had broken laptops in the past that were not detected as such because their DMI chassis-type was either undefined/out-of-spec, or set to 'other' or 'unknown'. this patch tries to mitigate this problem as follows: - if the DMI chassis-type clearly identifies the system as laptop/notebook/mobile platform then nothing changes: the user gets the laptop warning without a hint to the force switch. - if the DMI chassis-type is not specific enough, we warn the user similarly, but tell them the switch. to reduce the number of false positives i have added a few new chassis types that we have encountered in the last months to the list. Corresponding to flashrom svn r1390. Signed-off-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at> Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Diffstat (limited to 'internal.c')
-rw-r--r--internal.c19
1 files changed, 14 insertions, 5 deletions
diff --git a/internal.c b/internal.c
index c59209e9f..393842854 100644
--- a/internal.c
+++ b/internal.c
@@ -230,11 +230,19 @@ int internal_init(void)
/* Warn if a non-whitelisted laptop is detected. */
if (is_laptop && !laptop_ok) {
- msg_perr("========================================================================\n"
- "WARNING! You seem to be running flashrom on an unsupported laptop.\n"
- "Laptops, notebooks and netbooks are difficult to support and we recommend\n"
- "to use the vendor flashing utility. The embedded controller (EC) in these\n"
- "machines often interacts badly with flashing.\n"
+ msg_perr("========================================================================\n");
+ if (is_laptop == 1) {
+ msg_perr("WARNING! You seem to be running flashrom on an unsupported laptop.\n");
+ } else {
+ msg_perr("WARNING! You may be running flashrom on an unsupported laptop. We could\n"
+ "not detect this for sure because your vendor has not setup the SMBIOS\n"
+ "tables correctly. You can enforce execution by adding\n"
+ "'-p internal:laptop=force_I_want_a_brick' to the command line, but\n"
+ "please read the following warning if you are not sure.\n\n");
+ }
+ msg_perr("Laptops, notebooks and netbooks are difficult to support and we\n"
+ "recommend to use the vendor flashing utility. The embedded controller\n"
+ "(EC) in these machines often interacts badly with flashing.\n"
"See http://www.flashrom.org/Laptops for details.\n\n"
"If flash is shared with the EC, erase is guaranteed to brick your laptop\n"
"and write may brick your laptop.\n"
@@ -242,6 +250,7 @@ int internal_init(void)
"failure and sudden poweroff.\n"
"You have been warned.\n"
"========================================================================\n");
+
if (force_laptop) {
msg_perr("Proceeding anyway because user specified "
"laptop=force_I_want_a_brick\n");