bug fix on disk size handling, some vm disk use the start number 252 in /proc/partitions, inxi failed to handle that, and so failed to

show proper disk size in virtual machine.

New tarball/version number.
This commit is contained in:
inxi-svn 2012-12-22 20:11:43 +00:00
parent f60b86253f
commit 4e82d9b4d9

11
inxi
View file

@ -1,8 +1,8 @@
#!/bin/bash #!/bin/bash
######################################################################## ########################################################################
#### Script Name: inxi #### Script Name: inxi
#### version: 1.8.25 #### version: 1.8.26
#### Date: December 21 2012 #### Date: December 22 2012
#### Patch Number: 00 #### Patch Number: 00
######################################################################## ########################################################################
#### SPECIAL THANKS #### SPECIAL THANKS
@ -4414,7 +4414,8 @@ get_hdd_data_basic()
# size += $3 # size += $3
# } # }
# special case from this data: 8 0 156290904 sda # special case from this data: 8 0 156290904 sda
$1 ~ /^(3|22|33|8)$/ && $NF ~ /[hsv]d[a-z]$/ && ( $2 % 16 == 0 || $2 % 16 == 8 ) { # note: vm has 252 known starter
$1 ~ /^(3|8|22|33|252)$/ && $NF ~ /[hsv]d[a-z]$/ && ( $2 % 16 == 0 || $2 % 16 == 8 ) {
size += $3 size += $3
} }
@ -4435,7 +4436,9 @@ get_hdd_data_basic()
else { else {
print "NA,-" # print an empty array, this will be further handled in the print out function print "NA,-" # print an empty array, this will be further handled in the print out function
} }
}' $FILE_PARTITIONS ) ) }' $FILE_PARTITIONS
) )
log_function_data 'cat' "$FILE_PARTITIONS" log_function_data 'cat' "$FILE_PARTITIONS"
fi fi
IFS="$ORIGINAL_IFS" IFS="$ORIGINAL_IFS"