diff options
Diffstat (limited to 'modules-available/statistics')
-rw-r--r-- | modules-available/statistics/inc/hardwareparser.inc.php | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/modules-available/statistics/inc/hardwareparser.inc.php b/modules-available/statistics/inc/hardwareparser.inc.php index 952abf91..16710a9f 100644 --- a/modules-available/statistics/inc/hardwareparser.inc.php +++ b/modules-available/statistics/inc/hardwareparser.inc.php @@ -515,11 +515,13 @@ class HardwareParser foreach (($dev['sfdisk']['partitiontable']['partitions'] ?? []) as $part) { if (!isset($part['size'])) continue; - $type = hexdec($part['type'] ?? '0'); - if ($type === 0x0 || $type === 0x5 || $type === 0xf || $type === 0x15 || $type === 0x1f - || $type === 0x85 || $type === 0xc5 || $type == 0xcf) { - // Extended partition, ignore - continue; + if ($table['partition_table'] === 'dos') { + $type = hexdec($part['type'] ?? '0'); + if ($type === 0x0 || $type === 0x5 || $type === 0xf || $type === 0x15 || $type === 0x1f + || $type === 0x85 || $type === 0xc5 || $type == 0xcf) { + // Extended partition, ignore + continue; + } } $used += $part['size'] * $fac; $id = 'part_' . $i . '_'; |