summaryrefslogtreecommitdiff
path: root/zen/sys_info.cpp
diff options
context:
space:
mode:
authorB Stack <bgstack15@gmail.com>2020-11-02 12:45:42 +0000
committerB Stack <bgstack15@gmail.com>2020-11-02 12:45:42 +0000
commit3162cbdd63eaf7e930c8b2ebe604e10ecb369d08 (patch)
tree9939cdd1735bf15e97ad6700419c0604cac7c59e /zen/sys_info.cpp
parentMerge branch '11.2' into 'master' (diff)
parentadd upstream 11.3 (diff)
downloadFreeFileSync-3162cbdd63eaf7e930c8b2ebe604e10ecb369d08.tar.gz
FreeFileSync-3162cbdd63eaf7e930c8b2ebe604e10ecb369d08.tar.bz2
FreeFileSync-3162cbdd63eaf7e930c8b2ebe604e10ecb369d08.zip
Merge branch '11.3' into 'master'11.3
add upstream 11.3 See merge request opensource-tracking/FreeFileSync!27
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