mirror of
https://github.com/smxi/inxi.git
synced 2024-11-17 00:31:19 +00:00
cleaned up small trailing whitespace issue with ports output, put the cleanup where it belongs, in the data get function
This commit is contained in:
parent
a5b42c8fc0
commit
8ff14cda78
10
inxi
10
inxi
|
@ -1754,6 +1754,7 @@ get_audio_data()
|
||||||
usePciBusId = aPciBusId[i]
|
usePciBusId = aPciBusId[i]
|
||||||
}
|
}
|
||||||
# create array primary item for master array
|
# create array primary item for master array
|
||||||
|
sub( / $/, "", usePorts ) # clean off trailing whitespace
|
||||||
print a[j] "," useDrivers "," usePorts "," useModules "," usePciBusId
|
print a[j] "," useDrivers "," usePorts "," useModules "," usePciBusId
|
||||||
j++
|
j++
|
||||||
}
|
}
|
||||||
|
@ -2860,6 +2861,7 @@ get_networking_data()
|
||||||
# create array primary item for master array
|
# create array primary item for master array
|
||||||
# and strip out the counter again, this handled dual cards with same chipset
|
# and strip out the counter again, this handled dual cards with same chipset
|
||||||
sub( /~~[0-9]+$/, "", a[j] )
|
sub( /~~[0-9]+$/, "", a[j] )
|
||||||
|
sub( / $/, "", usePorts ) # clean off trailing whitespace
|
||||||
print a[j] "," useDrivers "," usePorts "," useModules, "," usePciBusId
|
print a[j] "," useDrivers "," usePorts "," useModules, "," usePciBusId
|
||||||
j++
|
j++
|
||||||
}
|
}
|
||||||
|
@ -4039,7 +4041,7 @@ print_audio_data()
|
||||||
port_data=" ${C1}at port$port_plural${C2} ${a_audio_working[2]}"
|
port_data=" ${C1}at port$port_plural${C2} ${a_audio_working[2]}"
|
||||||
fi
|
fi
|
||||||
if [[ -n ${a_audio_working[4]} && $B_EXTRA_DATA == 'true' ]];then
|
if [[ -n ${a_audio_working[4]} && $B_EXTRA_DATA == 'true' ]];then
|
||||||
pci_bus_id="${C1}BusID:${C2} ${a_audio_working[4]}"
|
pci_bus_id=" ${C1}BusID:${C2} ${a_audio_working[4]}"
|
||||||
fi
|
fi
|
||||||
audio_data="${C1}$card_one${C2} ${a_audio_working[0]}$alsa_driver$port_data$pci_bus_id"
|
audio_data="${C1}$card_one${C2} ${a_audio_working[0]}$alsa_driver$port_data$pci_bus_id"
|
||||||
audio_data=$( create_print_line "Audio:" "$audio_data" )
|
audio_data=$( create_print_line "Audio:" "$audio_data" )
|
||||||
|
@ -4069,7 +4071,7 @@ print_audio_data()
|
||||||
port_data=" ${C1}at port$port_plural${C2} ${a_audio_working[2]}"
|
port_data=" ${C1}at port$port_plural${C2} ${a_audio_working[2]}"
|
||||||
fi
|
fi
|
||||||
if [[ -n ${a_audio_working[4]} && $B_EXTRA_DATA == 'true' ]];then
|
if [[ -n ${a_audio_working[4]} && $B_EXTRA_DATA == 'true' ]];then
|
||||||
pci_bus_id="${C1}BusID:${C2} ${a_audio_working[4]}"
|
pci_bus_id=" ${C1}BusID:${C2} ${a_audio_working[4]}"
|
||||||
fi
|
fi
|
||||||
if [[ -n ${a_audio_working[0]} ]];then
|
if [[ -n ${a_audio_working[0]} ]];then
|
||||||
audio_data="${C1}Card-$(( $i + 1 ))${C2} ${a_audio_working[0]}$alsa_driver$port_data$pci_bus_id"
|
audio_data="${C1}Card-$(( $i + 1 ))${C2} ${a_audio_working[0]}$alsa_driver$port_data$pci_bus_id"
|
||||||
|
@ -4478,7 +4480,7 @@ print_networking_data()
|
||||||
port_data=" ${C1}at port$port_plural${C2} ${a_network_working[2]}"
|
port_data=" ${C1}at port$port_plural${C2} ${a_network_working[2]}"
|
||||||
fi
|
fi
|
||||||
if [[ -n ${a_network_working[4]} && $B_EXTRA_DATA == 'true' ]];then
|
if [[ -n ${a_network_working[4]} && $B_EXTRA_DATA == 'true' ]];then
|
||||||
pci_bus_id="${C1}BusID:${C2} ${a_network_working[4]}"
|
pci_bus_id=" ${C1}BusID:${C2} ${a_network_working[4]}"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
card_string=''
|
card_string=''
|
||||||
|
@ -4509,7 +4511,7 @@ print_networking_data()
|
||||||
port_data=" ${C1}at port$port_plural${C2} ${a_network_working[2]}"
|
port_data=" ${C1}at port$port_plural${C2} ${a_network_working[2]}"
|
||||||
fi
|
fi
|
||||||
if [[ -n ${a_network_working[4]} && $B_EXTRA_DATA == 'true' ]];then
|
if [[ -n ${a_network_working[4]} && $B_EXTRA_DATA == 'true' ]];then
|
||||||
pci_bus_id="${C1}BusID:${C2} ${a_network_working[4]}"
|
pci_bus_id=" ${C1}BusID:${C2} ${a_network_working[4]}"
|
||||||
fi
|
fi
|
||||||
network_data="${C1}Card-$(( $i + 1 ))${C2} ${a_network_working[0]}$driver_data$port_data$pci_bus_id"
|
network_data="${C1}Card-$(( $i + 1 ))${C2} ${a_network_working[0]}$driver_data$port_data$pci_bus_id"
|
||||||
network_data=$( create_print_line " " "$network_data" )
|
network_data=$( create_print_line " " "$network_data" )
|
||||||
|
|
Loading…
Reference in a new issue