Added some comments to swap partition section

This commit is contained in:
inxi-svn 2008-11-10 01:48:01 +00:00
parent 991d65fbee
commit 43ffbaa535

7
inxi
View file

@ -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 "