@@ 61-69 (lines=9) @@ | ||
58 | $hddtemp_value = ""; |
|
59 | if (CommonFunctions::rfts("/proc/diskstats", $strContent, 0, 4096, false)) { |
|
60 | $arrContent = preg_split("/\n/", $strContent, -1, PREG_SPLIT_NO_EMPTY); |
|
61 | foreach ($arrContent as $strLine) { |
|
62 | preg_match("/^\s(.*)\s([a-z]*)\s(.*)/", $strLine, $arrSplit); |
|
63 | if (! empty($arrSplit[2])) { |
|
64 | $strDrive = '/dev/'.$arrSplit[2]; |
|
65 | if (file_exists($strDrive)) { |
|
66 | $strDrives = $strDrives.$strDrive.' '; |
|
67 | } |
|
68 | } |
|
69 | } |
|
70 | } else { |
|
71 | if (CommonFunctions::rfts("/proc/partitions", $strContent, 0, 4096, false)) { |
|
72 | $arrContent = preg_split("/\n/", $strContent, -1, PREG_SPLIT_NO_EMPTY); |
|
@@ 73-83 (lines=11) @@ | ||
70 | } else { |
|
71 | if (CommonFunctions::rfts("/proc/partitions", $strContent, 0, 4096, false)) { |
|
72 | $arrContent = preg_split("/\n/", $strContent, -1, PREG_SPLIT_NO_EMPTY); |
|
73 | foreach ($arrContent as $strLine) { |
|
74 | if (!preg_match("/^\s(.*)\s([\/a-z0-9]*(\/disc))\s(.*)/", $strLine, $arrSplit)) { |
|
75 | preg_match("/^\s(.*)\s([a-z]*)\s(.*)/", $strLine, $arrSplit); |
|
76 | } |
|
77 | if (! empty($arrSplit[2])) { |
|
78 | $strDrive = '/dev/'.$arrSplit[2]; |
|
79 | if (file_exists($strDrive)) { |
|
80 | $strDrives = $strDrives.$strDrive.' '; |
|
81 | } |
|
82 | } |
|
83 | } |
|
84 | } |
|
85 | } |
|
86 | if (trim($strDrives) == "") { |