summaryrefslogtreecommitdiffstats
path: root/pts-core/functions
diff options
context:
space:
mode:
Diffstat (limited to 'pts-core/functions')
-rw-r--r--pts-core/functions/pts-functions_system.php7
-rw-r--r--pts-core/functions/pts-functions_system_graphics.php8
-rw-r--r--pts-core/functions/pts-functions_system_parsing.php4
3 files changed, 16 insertions, 3 deletions
diff --git a/pts-core/functions/pts-functions_system.php b/pts-core/functions/pts-functions_system.php
index 6cccaaa..49f08c1 100644
--- a/pts-core/functions/pts-functions_system.php
+++ b/pts-core/functions/pts-functions_system.php
@@ -128,6 +128,10 @@ function memory_mb_capacity()
$info = substr($info, strpos($info, ":") + 2);
$info = substr($info, 0, strpos($info, "Megabytes"));
}
+ else if(IS_BSD)
+ {
+ $info = floor(read_sysctl("hw.realmem") / 1048576);
+ }
else
$info = "Unknown";
@@ -269,8 +273,9 @@ function main_system_hardware_string()
$version = read_system_hal("system.hardware.version");
if($product == "Unknown" || $product == "Not Applicable" || (strpos($version, '.') === FALSE && $version != "Unknown"))
+ {
$product = $version;
-
+ }
if($vendor == "Unknown" || $vendor == "System manufacturer" || $vendor == "To Be Filled By O.E.M." || $vendor == "Not Applicable")
{
$info = "Unknown";
diff --git a/pts-core/functions/pts-functions_system_graphics.php b/pts-core/functions/pts-functions_system_graphics.php
index f48b8a8..650de25 100644
--- a/pts-core/functions/pts-functions_system_graphics.php
+++ b/pts-core/functions/pts-functions_system_graphics.php
@@ -314,6 +314,14 @@ function graphics_processor_string()
$info = $log_parse;
}
+ if(IS_BSD && $info == "Unknown")
+ {
+ $info = read_sysctl("dev.drm.0.%desc");
+
+ if($info == "Unknown")
+ $info = read_sysctl("dev.agp.0.%desc");
+ }
+
$info = pts_clean_information_string($info);
return $info;
diff --git a/pts-core/functions/pts-functions_system_parsing.php b/pts-core/functions/pts-functions_system_parsing.php
index 2e49565..80c8138 100644
--- a/pts-core/functions/pts-functions_system_parsing.php
+++ b/pts-core/functions/pts-functions_system_parsing.php
@@ -49,9 +49,9 @@ function read_acpi($point, $match)
function read_hal($name, $UDI = NULL)
{
if(empty($UDI))
- $info = shell_exec("lshal | grep \"" . $name . "\"");
+ $info = shell_exec("lshal 2>&1 | grep \"" . $name . "\"");
else
- $info = shell_exec("lshal -u $UDI | grep \"" . $name . "\"");
+ $info = shell_exec("lshal -u $UDI 2>&1 | grep \"" . $name . "\"");
if(($pos = strpos($info, $name . " = '")) === FALSE)
{