- Timestamp:
- 07/26/11 02:54:42 (10 months ago)
- Location:
- trunk
- Files:
-
- 2 edited
-
dmi.c (modified) (4 diffs)
-
internal.c (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/dmi.c
r1367 r1390 55 55 }; 56 56 57 /* A full list of chassis types can be found in the System Management BIOS 57 /* This list is used to identify supposed laptops. The is_laptop field has the 58 * following meaning: 59 * - 0: in all likelihood not a laptop 60 * - 1: in all likelihood a laptop 61 * - 2: chassis-type is not specific enough 62 * A full list of chassis types can be found in the System Management BIOS 58 63 * (SMBIOS) Reference Specification 2.7.0 section 7.4.1 "Chassis Types" at 59 64 * http://www.dmtf.org/sites/default/files/standards/documents/DSP0134_2.7.0.pdf … … 65 70 const char *name; 66 71 } dmi_chassis_types[] = { 67 {0x01, 0, "Other"},68 {0x02, 0, "Unknown"},72 {0x01, 2, "Other"}, 73 {0x02, 2, "Unknown"}, 69 74 {0x03, 0, "Desktop",}, 75 {0x06, 0, "Mini Tower"}, 76 {0x07, 0, "Tower"}, 70 77 {0x08, 1, "Portable"}, 71 78 {0x09, 1, "Laptop"}, … … 73 80 {0x0b, 1, "Hand Held"}, 74 81 {0x0e, 1, "Sub Notebook"}, 82 {0x11, 0, "Main Server Chassis"}, 83 {0x17, 0, "Rack Mount Chassis"}, 75 84 }; 76 85 … … 153 162 154 163 chassis_type = get_dmi_string("chassis-type"); 155 if (chassis_type ) {156 for (i = 0; i < ARRAY_SIZE(dmi_chassis_types); i++) {157 if (!strcasecmp(chassis_type, 158 dmi_chassis_types[i].name) &&159 dmi_chassis_types[i].is_laptop) {160 msg_pdbg("Laptop detected via DMI\n");161 is_laptop = 1;162 }164 if (chassis_type == NULL) 165 return; 166 167 is_laptop = 2; 168 for (i = 0; i < ARRAY_SIZE(dmi_chassis_types); i++) { 169 if (strcasecmp(chassis_type, dmi_chassis_types[i].name) == 0) { 170 is_laptop = dmi_chassis_types[i].is_laptop; 171 break; 163 172 } 173 } 174 175 switch (is_laptop) { 176 case 1: 177 msg_pdbg("Laptop detected via DMI.\n"); 178 break; 179 case 2: 180 msg_pdbg("DMI chassis-type is not specific enough.\n"); 181 break; 164 182 } 165 183 free(chassis_type); -
trunk/internal.c
r1371 r1390 231 231 /* Warn if a non-whitelisted laptop is detected. */ 232 232 if (is_laptop && !laptop_ok) { 233 msg_perr("========================================================================\n" 234 "WARNING! You seem to be running flashrom on an unsupported laptop.\n" 235 "Laptops, notebooks and netbooks are difficult to support and we recommend\n" 236 "to use the vendor flashing utility. The embedded controller (EC) in these\n" 237 "machines often interacts badly with flashing.\n" 233 msg_perr("========================================================================\n"); 234 if (is_laptop == 1) { 235 msg_perr("WARNING! You seem to be running flashrom on an unsupported laptop.\n"); 236 } else { 237 msg_perr("WARNING! You may be running flashrom on an unsupported laptop. We could\n" 238 "not detect this for sure because your vendor has not setup the SMBIOS\n" 239 "tables correctly. You can enforce execution by adding\n" 240 "'-p internal:laptop=force_I_want_a_brick' to the command line, but\n" 241 "please read the following warning if you are not sure.\n\n"); 242 } 243 msg_perr("Laptops, notebooks and netbooks are difficult to support and we\n" 244 "recommend to use the vendor flashing utility. The embedded controller\n" 245 "(EC) in these machines often interacts badly with flashing.\n" 238 246 "See http://www.flashrom.org/Laptops for details.\n\n" 239 247 "If flash is shared with the EC, erase is guaranteed to brick your laptop\n" … … 243 251 "You have been warned.\n" 244 252 "========================================================================\n"); 253 245 254 if (force_laptop) { 246 255 msg_perr("Proceeding anyway because user specified "
Note: See TracChangeset
for help on using the changeset viewer.
