summaryrefslogtreecommitdiffstats
path: root/modules-available/statistics/pages/machine.inc.php
diff options
context:
space:
mode:
Diffstat (limited to 'modules-available/statistics/pages/machine.inc.php')
-rw-r--r--modules-available/statistics/pages/machine.inc.php10
1 files changed, 7 insertions, 3 deletions
diff --git a/modules-available/statistics/pages/machine.inc.php b/modules-available/statistics/pages/machine.inc.php
index b23db721..019b0d8d 100644
--- a/modules-available/statistics/pages/machine.inc.php
+++ b/modules-available/statistics/pages/machine.inc.php
@@ -528,7 +528,7 @@ class SubPage
$used += $part['size'];
$lastEnd = $part['start'] + $part['size'];
if (!isset($part['name'])) {
- $part['name'] = self::mbrType($part['slxtype'] ?? $part['type']);
+ $part['name'] = self::partTypeToName($part['slxtype'] ?? $part['type']);
}
}
$dist = $hdd['size'] - $lastEnd;
@@ -651,7 +651,11 @@ class SubPage
return $retval;
}
- private static function mbrType(string $type): string
+ /**
+ * @param string $type MBR-type or GPT UUID
+ * @return string Name of partition type if known, otherwise, $type is returned
+ */
+ private static function partTypeToName(string $type): string
{
switch ($type) {
case '44':
@@ -666,7 +670,7 @@ class SubPage
case 'ef':
return 'EFI';
}
- return $type;
+ return HardwareInfo::GPT[$type] ?? $type;
}
} \ No newline at end of file