diff options
author | Michael Larabel <michael@phx-laptop.(none)> | 2008-11-20 17:50:34 -0500 |
---|---|---|
committer | Michael Larabel <michael@phx-laptop.(none)> | 2008-11-20 17:50:34 -0500 |
commit | 17cdd0c1cf0ca6eb2f31c9bf423afeb692acdccc (patch) | |
tree | 8ef926c100cd06b30feecc4a5a111786e3f73f97 /pts-core/functions/pts-functions_system_parsing.php | |
parent | 82fbbacb2bee2874f120d1562976d7dd5339310e (diff) | |
download | phoronix-test-suite-upstream-17cdd0c1cf0ca6eb2f31c9bf423afeb692acdccc.tar.gz phoronix-test-suite-upstream-17cdd0c1cf0ca6eb2f31c9bf423afeb692acdccc.tar.xz phoronix-test-suite-upstream-17cdd0c1cf0ca6eb2f31c9bf423afeb692acdccc.zip |
pts-core: Return false on failure from read_sysctl() 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 | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/pts-core/functions/pts-functions_system_parsing.php b/pts-core/functions/pts-functions_system_parsing.php index 2e7683d..dfcbe81 100644 --- a/pts-core/functions/pts-functions_system_parsing.php +++ b/pts-core/functions/pts-functions_system_parsing.php @@ -222,14 +222,14 @@ function read_lsb($desc) function read_sysctl($desc) { // Read sysctl, used by *BSDs - $info = "Unknown"; + $info = false; if(!is_array($desc)) { $desc = array($desc); } - for($i = 0; $i < count($desc) && $info == "Unknown"; $i++) + for($i = 0; $i < count($desc) && empty($info); $i++) { $output = shell_exec("sysctl " . $desc[$i] . " 2>&1"); |