mirror of
https://github.com/smxi/inxi.git
synced 2024-11-16 16:21:39 +00:00
Trying a raw fix for nvme0n1 type disks
This commit is contained in:
parent
1963fad67e
commit
852c7c81ed
8
inxi
8
inxi
|
@ -6098,7 +6098,7 @@ get_hdd_data_basic()
|
||||||
# note that linux 3.2.45-grsec-9th types kernels have this type of partition name: /dev/xvdc (no number, letter)
|
# note that linux 3.2.45-grsec-9th types kernels have this type of partition name: /dev/xvdc (no number, letter)
|
||||||
# note: btrfs does not seem to use partition integers, just the primary /dev/sdx identifier
|
# note: btrfs does not seem to use partition integers, just the primary /dev/sdx identifier
|
||||||
# df can also show /dev/disk/(by-label|by-uuid etc)
|
# df can also show /dev/disk/(by-label|by-uuid etc)
|
||||||
/^\/dev\/(disk\/|mapper\/|[hsv]d[a-z]+[0-9]*|dm[-]?[0-9]+|(ada|mmcblk)[0-9]+p[0-9]+.*|(ad|sd|wd)[0-9]+[a-z]|md[0-9]+|[aw]d[0-9]+s.*|xvd[a-z]+)|^ROOT/ {
|
/^\/dev\/(disk\/|mapper\/|[hsv]d[a-z]+[0-9]*|dm[-]?[0-9]+|(ada|mmcblk|nvme[0-9]+n)[0-9]+p[0-9]+.*|(ad|sd|wd)[0-9]+[a-z]|md[0-9]+|[aw]d[0-9]+s.*|xvd[a-z]+)|^ROOT/ {
|
||||||
# this handles the case where the first item is too long
|
# this handles the case where the first item is too long
|
||||||
# and makes df wrap output to next line, so here we advance
|
# and makes df wrap output to next line, so here we advance
|
||||||
# it to the next line for that single case. Using df -P should
|
# it to the next line for that single case. Using df -P should
|
||||||
|
@ -6157,7 +6157,7 @@ get_hdd_data_basic()
|
||||||
if [[ $B_PARTITIONS_FILE == 'true' ]];then
|
if [[ $B_PARTITIONS_FILE == 'true' ]];then
|
||||||
A_HDD_DATA=( $(
|
A_HDD_DATA=( $(
|
||||||
gawk -v hddUsed=$hdd_used '
|
gawk -v hddUsed=$hdd_used '
|
||||||
/([hsv]d[a-z]+|(ada|mmcblk)[0-9]+)$/ {
|
/([hsv]d[a-z]+|(ada|mmcblk|nvme[0-9]+n)[0-9]+)$/ {
|
||||||
driveSize = $(NF - 1)*1024/1000**3
|
driveSize = $(NF - 1)*1024/1000**3
|
||||||
gsub(/'"$BAN_LIST_ARRAY"'/, " ", driveSize)
|
gsub(/'"$BAN_LIST_ARRAY"'/, " ", driveSize)
|
||||||
gsub(/^ +| +$/, "", driveSize)
|
gsub(/^ +| +$/, "", driveSize)
|
||||||
|
@ -6387,8 +6387,8 @@ get_hard_drive_data_bsd()
|
||||||
size=0
|
size=0
|
||||||
bSetSize="false"
|
bSetSize="false"
|
||||||
}
|
}
|
||||||
$1 ~ /^(ad|ada|mmcblk|sd|wd)[0-9]+(|[[:space:]]at.*)$/ {
|
$1 ~ /^(ad|ada|mmcblk|nvme[0-9]+n|sd|wd)[0-9]+(|[[:space:]]at.*)$/ {
|
||||||
diskId=gensub(/^((ad|ada|mmcblk|sd|wd)[0-9]+)[^0-9].*/,"\\1",1,$1)
|
diskId=gensub(/^((ad|ada|mmcblk|nvme[0-9]+n|sd|wd)[0-9]+)[^0-9].*/,"\\1",1,$1)
|
||||||
# note: /var/run/dmesg.boot may repeat items since it is not created
|
# note: /var/run/dmesg.boot may repeat items since it is not created
|
||||||
# fresh every boot, this way, only the last items will be used per disk id
|
# fresh every boot, this way, only the last items will be used per disk id
|
||||||
if (aIds[diskId] == "" ) {
|
if (aIds[diskId] == "" ) {
|
||||||
|
|
Loading…
Reference in a new issue