diff options
author | Michael Larabel <michael@phx-laptop.(none)> | 2008-12-20 10:42:18 -0500 |
---|---|---|
committer | Michael Larabel <michael@phx-laptop.(none)> | 2008-12-20 10:42:18 -0500 |
commit | e396449f9eef8c3feffda616e83db94414f0d11c (patch) | |
tree | e7d0e2e633cc3204f3cd4c5efd9a4622e14abb65 /pts-core | |
parent | ebf77735315fbda88c27fbe4400d4ee368995cd3 (diff) | |
download | phoronix-test-suite-upstream-e396449f9eef8c3feffda616e83db94414f0d11c.tar.gz phoronix-test-suite-upstream-e396449f9eef8c3feffda616e83db94414f0d11c.tar.xz phoronix-test-suite-upstream-e396449f9eef8c3feffda616e83db94414f0d11c.zip |
pts-core: Improve lspci support for distributions using /sbin/lspci
(such as OpenSuSE)
Diffstat (limited to 'pts-core')
-rw-r--r-- | pts-core/functions/pts-functions_system_parsing.php | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/pts-core/functions/pts-functions_system_parsing.php b/pts-core/functions/pts-functions_system_parsing.php index 701e7b7..ebbcbe7 100644 --- a/pts-core/functions/pts-functions_system_parsing.php +++ b/pts-core/functions/pts-functions_system_parsing.php @@ -157,7 +157,16 @@ function read_pci($desc, $clean_string = true) if(empty($pci_info)) { - $pci_info = shell_exec("lspci 2>&1"); + if(!is_executable("/usr/bin/lspci") && is_executable("/sbin/lspci")) + { + $lspci_cmd = "/sbin/lspci"; + } + else + { + $lspci_cmd = "lspci"; + } + + $pci_info = shell_exec($lspci_cmd . " 2>&1"); } if(!is_array($desc)) { |