Subversion Repositories ALCASAR

Rev

Rev 2770 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log

Rev 2770 Rev 2976
Line 21... Line 21...
21
     *
21
     *
22
     * @return Void
22
     * @return Void
23
     */
23
     */
24
    public function build()
24
    public function build()
25
    {
25
    {
26
        if (PSI_OS == 'Linux') {
26
        if ((PSI_OS == 'Linux') && !defined('PSI_EMU_HOSTNAME')) {
27
            $hwpaths = glob("/sys/devices/platform/thinkpad_hwmon/", GLOB_NOSORT);
27
            $hwpaths = glob("/sys/devices/platform/thinkpad_hwmon/", GLOB_NOSORT);
28
            if (is_array($hwpaths) && (count($hwpaths) == 1)) {
28
            if (is_array($hwpaths) && (count($hwpaths) == 1)) {
-
 
29
                $hwpaths2 = glob("/sys/devices/platform/thinkpad_hwmon/hwmon/hwmon*/", GLOB_NOSORT);
-
 
30
                if (is_array($hwpaths2) && (count($hwpaths2) > 0)) {
-
 
31
                    $hwpaths = array_merge($hwpaths, $hwpaths2);
-
 
32
                }
-
 
33
                $totalh = count($hwpaths);
-
 
34
                for ($h = 0; $h < $totalh; $h++) {
29
                $this->_temperature($hwpaths[0]);
35
                    $this->_temperature($hwpaths[$h]);
30
                $this->_fans($hwpaths[0]);
36
                    $this->_fans($hwpaths[$h]);
-
 
37
                }
31
            }
38
            }
32
        }
39
        }
33
    }
40
    }
34
}
41
}