diff --git a/inxi b/inxi index 5c08eab..6bf019e 100755 --- a/inxi +++ b/inxi @@ -2374,7 +2374,7 @@ get_partition_data() A_PARTITION_DATA=( $( df -h -T --exclude-type=aufs --exclude-type=tmpfs --exclude-type=iso9660 | gawk ' BEGIN { IGNORECASE=1 - mountPoint="" + devBase="" } mountPoint="" # 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]+\%/ ) { # set the mount point here for cases of wrapped output if ( NF == 1 ){ - mountPoint=gensub( /^(\/dev\/)(.+)$/, "\\2", 1, $1 ) + devBase=gensub( /^(\/dev\/)(.+)$/, "\\2", 1, $1 ) } getline } # this handles yet another fredforfaen special case where a mounted drive # has the search string in its name $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 # 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 # using 3 cases, first default, standard, 2nd, 3rd, handles one and two spaces in name 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 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]+\%/ ) { - 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 } } ' )