mirror of
https://github.com/smxi/inxi.git
synced 2024-11-16 08:11:39 +00:00
Failed to use all possible sd block device major number matches, which
led to false disk total/used reports, that is, totals less than used.
This commit is contained in:
parent
287b8cfe77
commit
3a625f13ea
4
inxi
4
inxi
|
@ -9458,7 +9458,9 @@ sub proc_data {
|
|||
# Note: with > 1 nvme drives, the minor number no longer passes the modulus tests,
|
||||
# It appears to just increase randomly from the first 0 minor of the first nvme to
|
||||
# nvme partitions to next nvme, so it only passes the test for the first nvme drive.
|
||||
if ( $row->[0] =~ /^(3|8|22|33|43|179|202|252|253|254|259)$/ &&
|
||||
# note: 66 16 9766436864 sdah ; 65 240 9766436864 sdaf[maybe special case when double letters?
|
||||
# Check /proc/devices for major number matches
|
||||
if ( $row->[0] =~ /^(3|8|22|33|43|6[5-9]|7[12]|12[89]|13[0-5]|179|202|252|253|254|259)$/ &&
|
||||
$row->[-1] =~ /(mmcblk[0-9]+|n[b]?d[0-9]+|nvme[0-9]+n[0-9]+|fio[a-z]+|[hsv]d[a-z]+)$/ &&
|
||||
( $row->[1] % 16 == 0 || $row->[1] % 16 == 8 || $row->[-1] =~ /(nvme[0-9]+n[0-9]+)$/) ) {
|
||||
$size += $row->[2];
|
||||
|
|
|
@ -25,6 +25,9 @@ for the drives but now it's fixed anyway. I had not realized that smartctl
|
|||
made it plural when logical/physical were different, and singular when
|
||||
they were the same.
|
||||
|
||||
4. Failed to use all possible sd block device major number matches, which
|
||||
led to false disk total/used reports, that is, totals less than used.
|
||||
|
||||
Fixes:
|
||||
1. Going along with bug 2, fixed some other admin/non admin report glitches.
|
||||
Made patterns more aggressively matching, whitelist based to avoid the types
|
||||
|
|
Loading…
Reference in a new issue