From 43ffbaa535c5a8fdd56cb1fcbac68d8997433221 Mon Sep 17 00:00:00 2001 From: inxi-svn Date: Mon, 10 Nov 2008 01:48:01 +0000 Subject: [PATCH] Added some comments to swap partition section --- inxi | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/inxi b/inxi index a485d53..5f9885d 100755 --- a/inxi +++ b/inxi @@ -1414,7 +1414,7 @@ get_partition_data() /\/$|\/boot$|\/var$|\/home$/ { print $NF "," $(NF - 4) "," $(NF - 3) "," $(NF - 1) }' ) - + # now add the swap partition, this doesn't show percent used, someone can figure that in the future $( swapon -s | gawk ' /\dev\/[hs]d[a-z]/ { size = sprintf( "%.2f", $3*1024/1000**3 ) @@ -1717,7 +1717,7 @@ print_hard_disk_data() { local hdd_data='' partition_data='' a_partition_working='' hdd_model='' a_hdd_working='' local dev_data='' size_data='' hdd_model_2='' hdd_data_2='' usb_data='' partition_data_2='' - local partition_used='' swap='' + local partition_used='' swap='' hdd_model_3='' if [[ $VERBOSITY_LEVEL -ge 3 || $B_SHOW_FULL_HDD == 'true' ]];then ## note: the output part of this should be in the print hdd data function, not here @@ -1738,6 +1738,7 @@ print_hard_disk_data() size_data=" ${a_hdd_working[1]}" fi # wrap to avoid long lines + if [[ $i -gt 1 && $B_SHOW_FULL_HDD == 'true' ]] || [[ $i -gt 3 ]];then hdd_model_2="${hdd_model_2}${hdd_model_2+${C1}($(($i+1)))${C2}}$usb_data$dev_data${a_hdd_working[2]}$size_data " else @@ -1780,7 +1781,7 @@ print_hard_disk_data() else swap='' fi - if [[ $i < 2 ]];then + if [[ $i < 3 ]];then partition_data="$partition_data ${C1}ID:${C2}$swap ${a_partition_working[0]} ${C1}size:${C2} ${a_partition_working[1]}$partition_used" else partition_data_2="$partition_data_2${C1}ID:${C2}$swap ${a_partition_working[0]} ${C1}size:${C2} ${a_partition_working[1]}$partition_used "