summaryrefslogtreecommitdiffstats
path: root/pts-core/functions/pts-functions_system_parsing.php
diff options
context:
space:
mode:
authorMichael Larabel <michael@phx-laptop.(none)>2008-11-20 17:50:34 -0500
committerMichael Larabel <michael@phx-laptop.(none)>2008-11-20 17:50:34 -0500
commit17cdd0c1cf0ca6eb2f31c9bf423afeb692acdccc (patch)
tree8ef926c100cd06b30feecc4a5a111786e3f73f97 /pts-core/functions/pts-functions_system_parsing.php
parent82fbbacb2bee2874f120d1562976d7dd5339310e (diff)
downloadphoronix-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.php4
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");