mirror of
https://github.com/smxi/inxi.git
synced 2024-11-17 00:31:19 +00:00
patch to fix line lengths for / partition data, needs to be a bit shorter.
This commit is contained in:
parent
240ca4e2a7
commit
9c35a1dddd
8
inxi
8
inxi
|
@ -3,7 +3,7 @@
|
||||||
#### Script Name: inxi
|
#### Script Name: inxi
|
||||||
#### version: 1.7.20
|
#### version: 1.7.20
|
||||||
#### Date: July 22 2011
|
#### Date: July 22 2011
|
||||||
#### Patch Number: 01
|
#### Patch Number: 02
|
||||||
########################################################################
|
########################################################################
|
||||||
#### SPECIAL THANKS
|
#### SPECIAL THANKS
|
||||||
########################################################################
|
########################################################################
|
||||||
|
@ -7250,7 +7250,7 @@ print_partition_data()
|
||||||
local a_partition_working='' partition_used='' partition_data=''
|
local a_partition_working='' partition_used='' partition_data=''
|
||||||
local counter=0 i=0 a_partition_data='' line_starter='' line_max=$(( $LINE_MAX - 35 ))
|
local counter=0 i=0 a_partition_data='' line_starter='' line_max=$(( $LINE_MAX - 35 ))
|
||||||
local partitionIdClean='' part_dev='' full_dev='' part_label='' full_label=''
|
local partitionIdClean='' part_dev='' full_dev='' part_label='' full_label=''
|
||||||
local part_uuid='' full_uuid='' dev_remote='' full_fs=''
|
local part_uuid='' full_uuid='' dev_remote='' full_fs='' line_max_label_uuid=$(( $LINE_MAX - 10 ))
|
||||||
|
|
||||||
# set A_PARTITION_DATA
|
# set A_PARTITION_DATA
|
||||||
get_partition_data
|
get_partition_data
|
||||||
|
@ -7276,7 +7276,6 @@ print_partition_data()
|
||||||
fi
|
fi
|
||||||
full_fs="${C1}fs$SEP3${C2} $full_fs "
|
full_fs="${C1}fs$SEP3${C2} $full_fs "
|
||||||
|
|
||||||
# don't show user names in output
|
|
||||||
if [[ $B_SHOW_LABELS == 'true' || $B_SHOW_UUIDS == 'true' ]];then
|
if [[ $B_SHOW_LABELS == 'true' || $B_SHOW_UUIDS == 'true' ]];then
|
||||||
if [[ -n ${a_partition_working[6]} ]];then
|
if [[ -n ${a_partition_working[6]} ]];then
|
||||||
if [[ -z $( grep -E '(^//|:/)' <<< ${a_partition_working[6]} ) ]];then
|
if [[ -z $( grep -E '(^//|:/)' <<< ${a_partition_working[6]} ) ]];then
|
||||||
|
@ -7308,6 +7307,7 @@ print_partition_data()
|
||||||
full_uuid="${C1}uuid$SEP3${C2} $part_uuid"
|
full_uuid="${C1}uuid$SEP3${C2} $part_uuid"
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
# don't show user names in output
|
||||||
if [[ $B_OUTPUT_FILTER == 'true' ]];then
|
if [[ $B_OUTPUT_FILTER == 'true' ]];then
|
||||||
partitionIdClean=$( sed -r "s|/home/([^/]+)/(.*)|/home/$FILTER_STRING/\2|" <<< ${a_partition_working[0]} )
|
partitionIdClean=$( sed -r "s|/home/([^/]+)/(.*)|/home/$FILTER_STRING/\2|" <<< ${a_partition_working[0]} )
|
||||||
else
|
else
|
||||||
|
@ -7316,7 +7316,7 @@ print_partition_data()
|
||||||
id_size_fs="${C1}ID:${C2} $partitionIdClean ${C1}size$SEP3${C2} ${a_partition_working[1]} $partition_used$full_fs$full_dev"
|
id_size_fs="${C1}ID:${C2} $partitionIdClean ${C1}size$SEP3${C2} ${a_partition_working[1]} $partition_used$full_fs$full_dev"
|
||||||
label_uuid="$full_label$full_uuid"
|
label_uuid="$full_label$full_uuid"
|
||||||
# label/uuid always print one per line, so only wrap if it's very long
|
# label/uuid always print one per line, so only wrap if it's very long
|
||||||
if [[ $B_SHOW_UUIDS == 'true' && $B_SHOW_LABELS == 'true' && $( calculate_line_length "$id_size_fs$label_uuid" ) -gt $LINE_MAX ]];then
|
if [[ $B_SHOW_UUIDS == 'true' && $B_SHOW_LABELS == 'true' && $( calculate_line_length "$id_size_fs$label_uuid" ) -gt $line_max_label_uuid ]];then
|
||||||
a_partition_data[$counter]="$id_size_fs"
|
a_partition_data[$counter]="$id_size_fs"
|
||||||
((counter++))
|
((counter++))
|
||||||
a_partition_data[$counter]="$label_uuid"
|
a_partition_data[$counter]="$label_uuid"
|
||||||
|
|
Loading…
Reference in a new issue