summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Larabel <michael@phx-laptop.(none)>2008-08-26 10:31:47 -0400
committerMichael Larabel <michael@phx-laptop.(none)>2008-08-26 10:31:47 -0400
commit325177c4a5691c2b95b7b24193f3ad8532cc3b31 (patch)
tree79475f7c83c20ed1eac9bc85cde532eef47ec152
parent7b3d155b74bc9e6518251bcd2959acef1bcbe9d4 (diff)
downloadphoronix-test-suite-upstream-325177c4a5691c2b95b7b24193f3ad8532cc3b31.tar.gz
phoronix-test-suite-upstream-325177c4a5691c2b95b7b24193f3ad8532cc3b31.tar.xz
phoronix-test-suite-upstream-325177c4a5691c2b95b7b24193f3ad8532cc3b31.zip
pts-core: The read_pci() tags don't need to be postfixed with a colon
any longer
-rw-r--r--CHANGE-LOG1
-rw-r--r--pts-core/functions/pts-functions_system.php4
-rw-r--r--pts-core/functions/pts-functions_system_graphics.php2
-rw-r--r--pts-core/functions/pts-functions_system_parsing.php3
4 files changed, 7 insertions, 3 deletions
diff --git a/CHANGE-LOG b/CHANGE-LOG
index bad2bb6..6d099e9 100644
--- a/CHANGE-LOG
+++ b/CHANGE-LOG
@@ -10,6 +10,7 @@ Phoronix Test Suite
- pts-core: More improved motherboard detection support
- pts-core: Add SupportedPlatforms tag for optionally specifying on what operating systems this test is compatible with (Linux, Solaris, and FreeBSD)
- pts-core: Allow read_pci() to accept an array for fallback devices to read
+- pts-core: The read_pci() tags don't need to be postfixed with a colon any longer
- pts-core: Improved chipset / Northbridge detection
- documentation: Update the test profile and suite XML specifications
diff --git a/pts-core/functions/pts-functions_system.php b/pts-core/functions/pts-functions_system.php
index ebc7f20..4924847 100644
--- a/pts-core/functions/pts-functions_system.php
+++ b/pts-core/functions/pts-functions_system.php
@@ -173,11 +173,11 @@ function kernel_arch()
function motherboard_chipset_string()
{
// Returns motherboard chipset
- $info = read_pci("Host bridge:");
+ $info = read_pci("Host bridge");
if(count(explode(" ", $info)) == 1)
{
- $bridge = read_pci(array("Bridge:", "PCI bridge:"));
+ $bridge = read_pci(array("Bridge", "PCI bridge"));
if($bridge != "Unknown")
{
diff --git a/pts-core/functions/pts-functions_system_graphics.php b/pts-core/functions/pts-functions_system_graphics.php
index 4b38b5d..c1387b7 100644
--- a/pts-core/functions/pts-functions_system_graphics.php
+++ b/pts-core/functions/pts-functions_system_graphics.php
@@ -603,7 +603,7 @@ function graphics_processor_string()
if(empty($info) || strpos($info, "Mesa ") !== FALSE || $info == "Software Rasterizer")
{
- $info_pci = read_pci("VGA compatible controller:", false);
+ $info_pci = read_pci("VGA compatible controller", false);
if(!empty($info_pci) && $info_pci != "Unknown")
$info = $info_pci;
diff --git a/pts-core/functions/pts-functions_system_parsing.php b/pts-core/functions/pts-functions_system_parsing.php
index 074713c..47919bb 100644
--- a/pts-core/functions/pts-functions_system_parsing.php
+++ b/pts-core/functions/pts-functions_system_parsing.php
@@ -127,6 +127,9 @@ function read_pci($desc, $clean_string = true)
for($i = 0; $i < count($desc) && $info == "Unknown"; $i++)
{
+ if(substr($desc[$i], -1) != ":")
+ $desc[$i] .= ":";
+
if(($pos = strpos($pci_info, $desc[$i])) !== FALSE)
{
$sub_pci_info = substr($pci_info, $pos + strlen($desc[$i]));