Subversion Repositories ALCASAR

Rev

Rev 2976 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log

Rev 2976 Rev 3037
Line 17... Line 17...
17
    /**
17
    /**
18
     * get the information
18
     * get the information
19
     *
19
     *
20
     * @see PSI_Interface_Sensor::build()
20
     * @see PSI_Interface_Sensor::build()
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') && !defined('PSI_EMU_HOSTNAME')) {
26
        if ((PSI_OS == 'Linux') && !defined('PSI_EMU_HOSTNAME')) {
27
            $hwpaths = glob("/sys/devices/platform/thinkpad_hwmon/", GLOB_NOSORT);
27
            $hwpaths = CommonFunctions::findglob("/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);
29
                $hwpaths2 = CommonFunctions::findglob("/sys/devices/platform/thinkpad_hwmon/hwmon/hwmon*/", GLOB_NOSORT);
30
                if (is_array($hwpaths2) && (count($hwpaths2) > 0)) {
30
                if (is_array($hwpaths2) && (count($hwpaths2) > 0)) {
31
                    $hwpaths = array_merge($hwpaths, $hwpaths2);
31
                    $hwpaths = array_merge($hwpaths, $hwpaths2);
32
                }
32
                }
33
                $totalh = count($hwpaths);
33
                $totalh = count($hwpaths);
34
                for ($h = 0; $h < $totalh; $h++) {
34
                for ($h = 0; $h < $totalh; $h++) {