summaryrefslogtreecommitdiff
path: root/zen/sys_info.cpp
diff options
context:
space:
mode:
authorB Stack <bgstack15@gmail.com>2020-11-01 17:16:37 -0500
committerB Stack <bgstack15@gmail.com>2020-11-01 17:16:37 -0500
commit2a57306c461964f860ba1cb51f1bf96c954173e0 (patch)
tree9939cdd1735bf15e97ad6700419c0604cac7c59e /zen/sys_info.cpp
parentMerge branch '11.2' into 'master' (diff)
downloadFreeFileSync-2a57306c461964f860ba1cb51f1bf96c954173e0.tar.gz
FreeFileSync-2a57306c461964f860ba1cb51f1bf96c954173e0.tar.bz2
FreeFileSync-2a57306c461964f860ba1cb51f1bf96c954173e0.zip
add upstream 11.3
Diffstat (limited to 'zen/sys_info.cpp')
-rw-r--r--zen/sys_info.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/zen/sys_info.cpp b/zen/sys_info.cpp
index da5cc61f..475e1c6c 100644
--- a/zen/sys_info.cpp
+++ b/zen/sys_info.cpp
@@ -63,9 +63,12 @@ ComputerModel zen::getComputerModel() //throw FileError
cm.vendor = tryGetInfo("/sys/devices/virtual/dmi/id/sys_vendor"); //
//clean up:
+ cm.model = beforeFirst(cm.model , L'\u00ff', IfNotFoundReturn::all); //fix broken BIOS entries:
+ cm.vendor = beforeFirst(cm.vendor, L'\u00ff', IfNotFoundReturn::all); //0xff can be considered 0
+
for (const char* dummyModel :
{
- "To Be Filled By O.E.M.", "Default string", "empty", "O.E.M", "OEM", "NA",
+ "To Be Filled By O.E.M.", "Default string", "$(DEFAULT_STRING)", "Undefined", "empty", "O.E.M", "OEM", "NA",
"System Product Name", "Please change product name", "INVALID",
})
if (equalAsciiNoCase(cm.model, dummyModel))
@@ -76,7 +79,7 @@ ComputerModel zen::getComputerModel() //throw FileError
for (const char* dummyVendor :
{
- "To Be Filled By O.E.M.", "Default string", "empty", "O.E.M", "OEM", "NA",
+ "To Be Filled By O.E.M.", "Default string", "$(DEFAULT_STRING)", "Undefined", "empty", "O.E.M", "OEM", "NA",
"System manufacturer", "OEM Manufacturer",
})
if (equalAsciiNoCase(cm.vendor, dummyVendor))
bgstack15