diff options
author | Michael Larabel <michael@phx-laptop.(none)> | 2008-08-24 13:35:15 -0400 |
---|---|---|
committer | Michael Larabel <michael@phx-laptop.(none)> | 2008-08-24 13:35:15 -0400 |
commit | d277c45a4d384456492f373738980092fd99ec3f (patch) | |
tree | 42087ca392331a8cee18136c809a9af3d1fe76cf /pts-core/functions | |
parent | e3cacf83fc82abd898c9bdc0d6a44158644b2e7b (diff) | |
download | phoronix-test-suite-upstream-d277c45a4d384456492f373738980092fd99ec3f.tar.gz phoronix-test-suite-upstream-d277c45a4d384456492f373738980092fd99ec3f.tar.xz phoronix-test-suite-upstream-d277c45a4d384456492f373738980092fd99ec3f.zip |
pts-core: More improvements to motherboard detection
Diffstat (limited to 'pts-core/functions')
-rw-r--r-- | pts-core/functions/pts-functions.php | 2 | ||||
-rw-r--r-- | pts-core/functions/pts-functions_system.php | 8 | ||||
-rw-r--r-- | pts-core/functions/pts-functions_system_parsing.php | 2 |
3 files changed, 10 insertions, 2 deletions
diff --git a/pts-core/functions/pts-functions.php b/pts-core/functions/pts-functions.php index 51d7c01..c47c695 100644 --- a/pts-core/functions/pts-functions.php +++ b/pts-core/functions/pts-functions.php @@ -476,7 +476,7 @@ function pts_bool_question($question, $default = true, $question_id = "UNKNOWN") function pts_clean_information_string($str) { // Clean a string containing hardware information of some common things to change/strip out - $remove_phrases = array("corporation ", " technologies", ",", " technology", " Incorporation", "version ", "computer ", "processor ", "genuine ", "Unknown device ", "(r)", "(tm)", "inc. ", "inc ", "/pci/sse2/3dnow!", "/pci/sse2", "co. ltd", "co. ltd."); + $remove_phrases = array("corporation ", " technologies", ",", " technology", " incorporation", "version ", "computer ", "processor ", "genuine ", "unknown device ", "(r)", "(tm)", "inc. ", "inc ", "/pci/sse2/3dnow!", "/pci/sse2", "co. ltd", "co. ltd.", "northbridge only dual slot PCI-e_GFX and HT3 K8 part"); $str = str_ireplace($remove_phrases, " ", $str); $change_phrases = array("Memory Controller Hub" => "MCH", "Advanced Micro Devices" => "AMD", "MICRO-STAR INTERNATIONAL" => "MSI", "Silicon Integrated Systems" => "SiS", "Integrated Graphics Controller" => "IGP"); diff --git a/pts-core/functions/pts-functions_system.php b/pts-core/functions/pts-functions_system.php index e7c9e8c..4e7783e 100644 --- a/pts-core/functions/pts-functions_system.php +++ b/pts-core/functions/pts-functions_system.php @@ -311,6 +311,14 @@ function main_system_hardware_string() if(empty($info)) { + $fw_version = explode(" ", read_system_hal("system.firmware.version")); + + if(count($fw_version) > 1) + $info = $fw_version[0] . " " . $fw_version[1]; + } + + if(empty($info)) + { $info = read_hal("pci.subsys_vendor"); } diff --git a/pts-core/functions/pts-functions_system_parsing.php b/pts-core/functions/pts-functions_system_parsing.php index 25a10a2..30425af 100644 --- a/pts-core/functions/pts-functions_system_parsing.php +++ b/pts-core/functions/pts-functions_system_parsing.php @@ -65,7 +65,7 @@ function read_hal($name, $UDI = NULL) $info = trim(substr($info, 0, strpos($info, "'"))); } - $remove_words = array("empty", "unknow", "system manufacturer", "system version", "to be filled by o.e.m.", "not applicable"); + $remove_words = array("empty", "unknow", "system manufacturer", "system version", "system name", "to be filled by o.e.m.", "not applicable"); if(empty($info) || in_array(strtolower($info), $remove_words)) $info = "Unknown"; |