diff options
author | Michael Larabel <michael@phx-laptop.(none)> | 2008-11-20 17:55:11 -0500 |
---|---|---|
committer | Michael Larabel <michael@phx-laptop.(none)> | 2008-11-20 17:55:11 -0500 |
commit | 559856d65502a72e9a2fa368aa77f23f32063e2d (patch) | |
tree | d496db68999e9adae3d8ca35136dd1944869f9b7 /pts-core/functions/pts-functions_system_parsing.php | |
parent | 17cdd0c1cf0ca6eb2f31c9bf423afeb692acdccc (diff) | |
download | phoronix-test-suite-upstream-559856d65502a72e9a2fa368aa77f23f32063e2d.tar.gz phoronix-test-suite-upstream-559856d65502a72e9a2fa368aa77f23f32063e2d.tar.xz phoronix-test-suite-upstream-559856d65502a72e9a2fa368aa77f23f32063e2d.zip |
pts-core: Return false on failure from read_hal(), read_system_hal()
instead of "Unknown" string
Diffstat (limited to 'pts-core/functions/pts-functions_system_parsing.php')
-rw-r--r-- | pts-core/functions/pts-functions_system_parsing.php | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/pts-core/functions/pts-functions_system_parsing.php b/pts-core/functions/pts-functions_system_parsing.php index dfcbe81..a9beaf6 100644 --- a/pts-core/functions/pts-functions_system_parsing.php +++ b/pts-core/functions/pts-functions_system_parsing.php @@ -57,7 +57,7 @@ function read_hal($name, $UDI = null) { // Read HAL - Hardware Abstraction Layer static $remove_words = null; - $info = "Unknown"; + $info = false; if(!is_array($name)) { @@ -69,7 +69,7 @@ function read_hal($name, $UDI = null) $remove_words = array_map("trim", explode("\n", $word_file)); } - for($i = 0; $i < count($name) && $info == "Unknown"; $i++) + for($i = 0; $i < count($name) && empty($info); $i++) { if(empty($UDI)) { @@ -88,7 +88,7 @@ function read_hal($name, $UDI = null) if(empty($info) || in_array(strtolower($info), $remove_words)) { - $info = "Unknown"; + $info = false; } } @@ -99,7 +99,7 @@ function read_system_hal($name) // Read system HAL $hal = read_hal($name, "/org/freedesktop/Hal/devices/computer"); - if($hal == "Unknown") + if(empty($hal)) { $hal = read_hal($name); } |