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:45:45 -0500
committerMichael Larabel <michael@phx-laptop.(none)>2008-11-20 17:45:45 -0500
commit82fbbacb2bee2874f120d1562976d7dd5339310e (patch)
tree1db8ebd86b062bb189ad072faf6a870a65694ea2 /pts-core/functions/pts-functions_system_parsing.php
parenta4c22653687fdc9a835089f4b35c193f9669827e (diff)
downloadphoronix-test-suite-upstream-82fbbacb2bee2874f120d1562976d7dd5339310e.tar.gz
phoronix-test-suite-upstream-82fbbacb2bee2874f120d1562976d7dd5339310e.tar.xz
phoronix-test-suite-upstream-82fbbacb2bee2874f120d1562976d7dd5339310e.zip
pts-core: Return false on failure from read_lsb() 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.php7
1 files changed, 2 insertions, 5 deletions
diff --git a/pts-core/functions/pts-functions_system_parsing.php b/pts-core/functions/pts-functions_system_parsing.php
index f08bd88..2e7683d 100644
--- a/pts-core/functions/pts-functions_system_parsing.php
+++ b/pts-core/functions/pts-functions_system_parsing.php
@@ -156,7 +156,7 @@ function read_pci($desc, $clean_string = true)
$desc = array($desc);
}
- for($i = 0; $i < count($desc) && $info == "Unknown"; $i++)
+ for($i = 0; $i < count($desc) && empty($info); $i++)
{
if(substr($desc[$i], -1) != ":")
{
@@ -204,6 +204,7 @@ function read_lsb($desc)
{
// Read LSB Release information, Linux Standards Base
static $output = null;
+ $info = false;
if(empty($output))
{
@@ -215,10 +216,6 @@ function read_lsb($desc)
$info = substr($output, $pos + strlen($desc) + 1);
$info = trim(substr($info, 0, strpos($info, "\n")));
}
- else
- {
- $info = "Unknown";
- }
return $info;
}