mirror of
https://github.com/smxi/inxi.git
synced 2024-11-17 00:31:19 +00:00
Bug fix
This commit is contained in:
parent
9a4e3433c5
commit
a1d3fb0d32
12
inxi
12
inxi
|
@ -2374,7 +2374,7 @@ get_partition_data()
|
||||||
A_PARTITION_DATA=( $( df -h -T --exclude-type=aufs --exclude-type=tmpfs --exclude-type=iso9660 | gawk '
|
A_PARTITION_DATA=( $( df -h -T --exclude-type=aufs --exclude-type=tmpfs --exclude-type=iso9660 | gawk '
|
||||||
BEGIN {
|
BEGIN {
|
||||||
IGNORECASE=1
|
IGNORECASE=1
|
||||||
mountPoint=""
|
devBase=""
|
||||||
}
|
}
|
||||||
mountPoint=""
|
mountPoint=""
|
||||||
# this is required because below we are subtracting from NF, so it has to be
|
# this is required because below we are subtracting from NF, so it has to be
|
||||||
|
@ -2383,14 +2383,14 @@ get_partition_data()
|
||||||
( NF < 5 ) && ( $0 !~ /[0-9]+\%/ ) {
|
( NF < 5 ) && ( $0 !~ /[0-9]+\%/ ) {
|
||||||
# set the mount point here for cases of wrapped output
|
# set the mount point here for cases of wrapped output
|
||||||
if ( NF == 1 ){
|
if ( NF == 1 ){
|
||||||
mountPoint=gensub( /^(\/dev\/)(.+)$/, "\\2", 1, $1 )
|
devBase=gensub( /^(\/dev\/)(.+)$/, "\\2", 1, $1 )
|
||||||
}
|
}
|
||||||
getline
|
getline
|
||||||
}
|
}
|
||||||
# this handles yet another fredforfaen special case where a mounted drive
|
# this handles yet another fredforfaen special case where a mounted drive
|
||||||
# has the search string in its name
|
# has the search string in its name
|
||||||
$NF ~ /^\/$|^\/boot$|^\/var$|^\/home$|^\/tmp$|^\/usr$/ {
|
$NF ~ /^\/$|^\/boot$|^\/var$|^\/home$|^\/tmp$|^\/usr$/ {
|
||||||
print $NF "," $(NF - 4) "," $(NF - 3) "," $(NF - 1) ",main," mountPoint
|
print $NF "," $(NF - 4) "," $(NF - 3) "," $(NF - 1) ",main," devBase
|
||||||
}
|
}
|
||||||
# skip all these, including the first, header line. Use the --exclude-type
|
# skip all these, including the first, header line. Use the --exclude-type
|
||||||
# to handle new filesystems types we do not want listed here
|
# to handle new filesystems types we do not want listed here
|
||||||
|
@ -2399,14 +2399,14 @@ get_partition_data()
|
||||||
# the test show the wrong data in each of the fields, if no x%, then do not use
|
# the test show the wrong data in each of the fields, if no x%, then do not use
|
||||||
# using 3 cases, first default, standard, 2nd, 3rd, handles one and two spaces in name
|
# using 3 cases, first default, standard, 2nd, 3rd, handles one and two spaces in name
|
||||||
if ( $(NF - 1) ~ /[0-9]+\%/ ) {
|
if ( $(NF - 1) ~ /[0-9]+\%/ ) {
|
||||||
print $NF "," $(NF - 4) "," $(NF - 3) "," $(NF - 1) ",secondary," mountPoint
|
print $NF "," $(NF - 4) "," $(NF - 3) "," $(NF - 1) ",secondary," devBase
|
||||||
}
|
}
|
||||||
# these two cases construct the space containing name
|
# these two cases construct the space containing name
|
||||||
else if ( $(NF - 2) ~ /[0-9]+\%/ ) {
|
else if ( $(NF - 2) ~ /[0-9]+\%/ ) {
|
||||||
print $(NF - 1) " " $NF "," $(NF - 5) "," $(NF - 4) "," $(NF - 2) ",secondary," mountPoint
|
print $(NF - 1) " " $NF "," $(NF - 5) "," $(NF - 4) "," $(NF - 2) ",secondary," devBase
|
||||||
}
|
}
|
||||||
else if ( $(NF - 3) ~ /[0-9]+\%/ ) {
|
else if ( $(NF - 3) ~ /[0-9]+\%/ ) {
|
||||||
print $(NF - 2) " " $(NF - 1) " " $NF "," $(NF - 6) "," $(NF - 5) "," $(NF - 3) ",secondary," mountPoint
|
print $(NF - 2) " " $(NF - 1) " " $NF "," $(NF - 6) "," $(NF - 5) "," $(NF - 3) ",secondary," devBase
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
' )
|
' )
|
||||||
|
|
Loading…
Reference in a new issue