diff options
author | Michael Larabel <michael@phx-laptop.(none)> | 2008-10-31 18:49:00 -0400 |
---|---|---|
committer | Michael Larabel <michael@phx-laptop.(none)> | 2008-10-31 18:49:00 -0400 |
commit | b70b8a379275586c67c7cab328af6e75785522d1 (patch) | |
tree | 3250b74f2675e007c764a529858819c9599db438 /pts-core/functions/pts-functions_system.php | |
parent | c820cdb74b91364710dedaee52635420ce171fd5 (diff) | |
download | phoronix-test-suite-upstream-b70b8a379275586c67c7cab328af6e75785522d1.tar.gz phoronix-test-suite-upstream-b70b8a379275586c67c7cab328af6e75785522d1.tar.xz phoronix-test-suite-upstream-b70b8a379275586c67c7cab328af6e75785522d1.zip |
pts-core: Rework code to pts_hw_string() and pts_sw_string()
Diffstat (limited to 'pts-core/functions/pts-functions_system.php')
-rw-r--r-- | pts-core/functions/pts-functions_system.php | 39 |
1 files changed, 21 insertions, 18 deletions
diff --git a/pts-core/functions/pts-functions_system.php b/pts-core/functions/pts-functions_system.php index b5d43c4..d12b05f 100644 --- a/pts-core/functions/pts-functions_system.php +++ b/pts-core/functions/pts-functions_system.php @@ -23,7 +23,6 @@ require_once("pts-core/functions/pts-functions_system_software.php"); require_once("pts-core/functions/pts-functions_system_hardware.php"); - require_once("pts-core/functions/pts-functions_system_parsing.php"); require_once("pts-core/functions/pts-functions_system_cpu.php"); require_once("pts-core/functions/pts-functions_system_graphics.php"); @@ -31,27 +30,31 @@ require_once("pts-core/functions/pts-functions_system_graphics.php"); function pts_hw_string() { // Returns string of hardware information - $hw_string = "Processor: " . processor_string() . " (Total Cores: " . cpu_core_count() . "), "; - $hw_string .= "Motherboard: " . main_system_hardware_string() . ", "; - $hw_string .= "Chipset: " . motherboard_chipset_string() . ", "; - $hw_string .= "System Memory: " . system_memory_string() . ", "; - $hw_string .= "Disk: " . system_hard_disks() . ", "; - $hw_string .= "Graphics: " . graphics_processor_string() . graphics_frequency_string() . ", "; - $hw_string .= "Screen Resolution: " . current_screen_resolution() . " "; - - return $hw_string; + $hardware = array(); + + array_push($hardware, "Processor: " . processor_string() . " (Total Cores: " . cpu_core_count() . ")"); + array_push($hardware, "Motherboard: " . main_system_hardware_string()); + array_push($hardware, "Chipset: " . motherboard_chipset_string()); + array_push($hardware, "System Memory: " . system_memory_string()); + array_push($hardware, "Disk: " . system_hard_disks()); + array_push($hardware, "Graphics: " . graphics_processor_string() . graphics_frequency_string()); + array_push($hardware, "Screen Resolution: " . current_screen_resolution()); + + return implode(", ", $hardware); } function pts_sw_string() { // Returns string of software information - $sw_string = "OS: " . operating_system_release() . ", "; - $sw_string .= "Kernel: " . kernel_string() . " (" . kernel_arch() . "), "; - $sw_string .= "X.Org Server: " . graphics_subsystem_version() . ", "; - $sw_string .= "OpenGL: " . opengl_version() . ", "; - $sw_string .= "Compiler: " . compiler_version() . ", "; - $sw_string .= "File-System: " . filesystem_type() . " "; - - return $sw_string; + $software = array(); + + array_push($software, "OS: " . operating_system_release()); + array_push($software, "Kernel: " . kernel_string() . " (" . kernel_arch() . ")"); + array_push($software, "X.Org Server: " . graphics_subsystem_version()); + array_push($software, "OpenGL: " . opengl_version()); + array_push($software, "Compiler: " . compiler_version()); + array_push($software, "File-System: " . filesystem_type()); + + return implode(", ", $software); } function pts_system_identifier_string() { |