summaryrefslogtreecommitdiffstats
path: root/pts-core/functions/pts-functions_system_parsing.php
diff options
context:
space:
mode:
authorMichael Larabel <michael@phx-laptop.(none)>2008-10-15 20:33:23 -0400
committerMichael Larabel <michael@phx-laptop.(none)>2008-10-15 20:33:23 -0400
commit4862cc498183911ae2ef15a932b9b378ff8cbea9 (patch)
tree1ecb64d6f1bff7fa3e0a4490f1264da9652c9856 /pts-core/functions/pts-functions_system_parsing.php
parentf71fd5a109fff79b76ecc0185cc9e34187db6ea8 (diff)
downloadphoronix-test-suite-upstream-4862cc498183911ae2ef15a932b9b378ff8cbea9.tar.gz
phoronix-test-suite-upstream-4862cc498183911ae2ef15a932b9b378ff8cbea9.tar.xz
phoronix-test-suite-upstream-4862cc498183911ae2ef15a932b9b378ff8cbea9.zip
pts: Update all test profiles as to whether they support
Solaris/OpenSolaris
Diffstat (limited to 'pts-core/functions/pts-functions_system_parsing.php')
-rw-r--r--pts-core/functions/pts-functions_system_parsing.php45
1 files changed, 45 insertions, 0 deletions
diff --git a/pts-core/functions/pts-functions_system_parsing.php b/pts-core/functions/pts-functions_system_parsing.php
index c253a95..6de9ccd 100644
--- a/pts-core/functions/pts-functions_system_parsing.php
+++ b/pts-core/functions/pts-functions_system_parsing.php
@@ -568,5 +568,50 @@ function read_osx_system_profiler($data_type, $object)
return $value;
}
+function read_sun_ddu_dmi_info($object)
+{
+ // Read Sun's Device Driver Utility for OpenSolaris
+ $values = array();
+
+ if(is_executable("/usr/ddu/bin/dmi_info"))
+ {
+ $info = shell_exec("/usr/ddu/bin/dmi_info 2>&1");
+ $lines = explode("\n", $info);
+
+ $objects = explode(",", $object);
+ $this_section = "";
+ if(count($objects) == 2)
+ {
+ $section = $objects[0];
+ $object = $objects[1];
+ }
+ else
+ {
+ $section = "";
+ $object = $objects[0];
+ }
+
+ foreach($lines as $line)
+ {
+ $line = explode(":", $line);
+ $line_object = str_replace(" ", "", $line[0]);
+
+ if(count($line) > 1)
+ $this_value = trim($line[1]);
+ else
+ $this_value = "";
+
+ if(empty($this_value) && !empty($section))
+ {
+ $this_section = $line_object;
+ }
+
+ if($line_object == $object && $this_section == $section && !empty($this_value))
+ array_push($values, $this_value);
+ }
+ }
+
+ return $values;
+}
?>