mirror of
https://github.com/smxi/inxi.git
synced 2025-01-31 10:02:18 +00:00
Added some comments to swap partition section
This commit is contained in:
parent
991d65fbee
commit
43ffbaa535
7
inxi
7
inxi
|
@ -1414,7 +1414,7 @@ get_partition_data()
|
||||||
/\/$|\/boot$|\/var$|\/home$/ {
|
/\/$|\/boot$|\/var$|\/home$/ {
|
||||||
print $NF "," $(NF - 4) "," $(NF - 3) "," $(NF - 1)
|
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 '
|
$( swapon -s | gawk '
|
||||||
/\dev\/[hs]d[a-z]/ {
|
/\dev\/[hs]d[a-z]/ {
|
||||||
size = sprintf( "%.2f", $3*1024/1000**3 )
|
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 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 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
|
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
|
## 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]}"
|
size_data=" ${a_hdd_working[1]}"
|
||||||
fi
|
fi
|
||||||
# wrap to avoid long lines
|
# wrap to avoid long lines
|
||||||
|
|
||||||
if [[ $i -gt 1 && $B_SHOW_FULL_HDD == 'true' ]] || [[ $i -gt 3 ]];then
|
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 "
|
hdd_model_2="${hdd_model_2}${hdd_model_2+${C1}($(($i+1)))${C2}}$usb_data$dev_data${a_hdd_working[2]}$size_data "
|
||||||
else
|
else
|
||||||
|
@ -1780,7 +1781,7 @@ print_hard_disk_data()
|
||||||
else
|
else
|
||||||
swap=''
|
swap=''
|
||||||
fi
|
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"
|
partition_data="$partition_data ${C1}ID:${C2}$swap ${a_partition_working[0]} ${C1}size:${C2} ${a_partition_working[1]}$partition_used"
|
||||||
else
|
else
|
||||||
partition_data_2="$partition_data_2${C1}ID:${C2}$swap ${a_partition_working[0]} ${C1}size:${C2} ${a_partition_working[1]}$partition_used "
|
partition_data_2="$partition_data_2${C1}ID:${C2}$swap ${a_partition_working[0]} ${C1}size:${C2} ${a_partition_working[1]}$partition_used "
|
||||||
|
|
Loading…
Reference in a new issue