From 4e82d9b4d97365b2c21b34c18ae20f80540315d1 Mon Sep 17 00:00:00 2001 From: inxi-svn Date: Sat, 22 Dec 2012 20:11:43 +0000 Subject: [PATCH] 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. --- inxi | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/inxi b/inxi index f8481f7..6c65926 100755 --- a/inxi +++ b/inxi @@ -1,8 +1,8 @@ #!/bin/bash ######################################################################## #### Script Name: inxi -#### version: 1.8.25 -#### Date: December 21 2012 +#### version: 1.8.26 +#### Date: December 22 2012 #### Patch Number: 00 ######################################################################## #### SPECIAL THANKS @@ -4414,7 +4414,8 @@ get_hdd_data_basic() # size += $3 # } # 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 } @@ -4435,8 +4436,10 @@ get_hdd_data_basic() else { print "NA,-" # print an empty array, this will be further handled in the print out function } - }' $FILE_PARTITIONS ) ) - log_function_data 'cat' "$FILE_PARTITIONS" + }' $FILE_PARTITIONS + ) ) + + log_function_data 'cat' "$FILE_PARTITIONS" fi IFS="$ORIGINAL_IFS" temp_array=${A_HDD_DATA[@]}