diff --git a/inxi b/inxi index f48928b..61b7b9a 100755 --- a/inxi +++ b/inxi @@ -1,7 +1,7 @@ #!/bin/bash ######################################################################## #### Script Name: inxi -#### version: 0.4.13 +#### version: 0.4.14 #### Date: November 8 2008 ######################################################################## #### inxi is a fork of infobash, the original bash sys info script by locsmif @@ -1177,14 +1177,16 @@ get_hdd_data_basic() # final item is the total of the disk IFS=$'\n' A_HDD_DATA=( $( gawk -v hddused="$hdd_used" ' - /[hs]d[a-x]$/ { + /[hs]d[a-z]$/ { driveSize = $(NF - 1)*1024/1000**3 gsub(/,/, " ", driveSize) gsub(/^ +| +$/, "", driveSize) printf( $NF",%.1fGB,,\n", driveSize ) } # See http://lanana.org/docs/device-list/devices-2.6+.txt for major numbers used below - $1 ~ /^(3|22|33|8)$/ && $2 % 16 == 0 {size+=$3} + # $1 ~ /^(3|22|33|8)$/ && $2 % 16 == 0 {size+=$3} + # special case from this data: 8 0 156290904 sda + $1 ~ /^(3|22|33|8)$/ && $NF ~ /[hs]d[a-z]$/ && ( $2 % 16 == 0 || $2 % 16 == 8 ) {size+=$3} END { size = size*1024/1000**3 # calculate size in GB size workingUsed = hddused*1024/1000**3 # calculate workingUsed in GB used