Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/serverinfo.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCôme Chilliet <91878298+come-nc@users.noreply.github.com>2022-09-19 12:07:22 +0300
committerGitHub <noreply@github.com>2022-09-19 12:07:22 +0300
commite6cfdc78dc5dd8e8fc64c033492394dc8d2bc5aa (patch)
tree11b470650d6f1ff0d09331f0820765a6bdfb2c62
parent83e6edcceac07d328f8ba07fba82075f275766be (diff)
Update FreeBSD::getDiskInfo() (#398)v25.0.0beta7
Signed-off-by: HouraisanNEET <HouraisanNEET@users.noreply.github.com> Signed-off-by: HouraisanNEET <HouraisanNEET@users.noreply.github.com> Co-authored-by: HouraisanNEET <HouraisanNEET@users.noreply.github.com>
-rw-r--r--lib/OperatingSystems/FreeBSD.php5
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/OperatingSystems/FreeBSD.php b/lib/OperatingSystems/FreeBSD.php
index 85c6bbf..e39d88b 100644
--- a/lib/OperatingSystems/FreeBSD.php
+++ b/lib/OperatingSystems/FreeBSD.php
@@ -211,15 +211,16 @@ class FreeBSD implements IOperatingSystem {
}
$matches = [];
- $pattern = '/^(?<Filesystem>[\w\/-]+)\s*(?<Type>\w+)\s*(?<Blocks>\d+)\s*(?<Used>\d+)\s*(?<Available>\d+)\s*(?<Capacity>\d+%)\s*(?<Mounted>[\w\/-]+)$/m';
+ $pattern = '/^(?<Filesystem>[\S]+)\s*(?<Type>[\S]+)\s*(?<Blocks>\d+)\s*(?<Used>\d+)\s*(?<Available>\d+)\s*(?<Capacity>\d+%)\s*(?<Mounted>[\w\/-]+)$/m';
$result = preg_match_all($pattern, $disks, $matches);
if ($result === 0 || $result === false) {
return $data;
}
+ $excluded = ['devfs', 'fdescfs', 'tmpfs', 'devtmpfs', 'procfs', 'linprocfs', 'linsysfs'];
foreach ($matches['Filesystem'] as $i => $filesystem) {
- if (in_array($matches['Type'][$i], ['tmpfs', 'devtmpfs'], false)) {
+ if (in_array($matches['Type'][$i], $excluded, false)) {
continue;
}