From 41caad5be00e695308840a2b69078771920b837d Mon Sep 17 00:00:00 2001 From: inxi-svn Date: Fri, 24 Jun 2011 17:22:40 +0000 Subject: [PATCH] new version: bug fix A case where pcibusid includes the pre- 0000: appeared, that broke the -N pcibus id handling for -n, which made for no output. Now inxi will just slice off that in the initial lspci creator. --- inxi | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/inxi b/inxi index c675fa3..4e6cacb 100755 --- a/inxi +++ b/inxi @@ -1,7 +1,7 @@ #!/bin/bash ######################################################################## #### Script Name: inxi -#### version: 1.7.9 +#### version: 1.7.10 #### Date: June 22 2011 #### Patch Number: 00 ######################################################################## @@ -4096,6 +4096,7 @@ get_lspci_data() eval $LOGFS local lspci_data="$( lspci -v | gawk '{ gsub(/\(prog-if[^)]*\)/,"") + sub(/^0000:/, "", $0) # seen case where the 0000: is prepended, rare, but happens print }' )" @@ -4216,7 +4217,8 @@ get_networking_data() local b_usb_networking='false' temp_array='' IFS=$'\n' - A_NETWORK_DATA=( $( echo "$Lspci_Data" | gawk ' + A_NETWORK_DATA=( $( + echo "$Lspci_Data" | gawk ' BEGIN { IGNORECASE=1 counter=0 # required to handle cases of > 1 instance of the same chipset @@ -4283,7 +4285,8 @@ get_networking_data() print a[j] "," useDrivers "," usePorts "," useModules, "," usePciBusId j++ } - }') ) + }' + ) ) IFS="$ORIGINAL_IFS" b_usb_networking=$( get_networking_usb_data ) @@ -7481,15 +7484,16 @@ print_system_data() if [[ $B_EXTRA_DATA == 'true' ]];then gcc_string=$( get_gcc_version ) if [[ -n $gcc_string ]];then - gcc_string=" ${C1}gcc${C2} $gcc_string" + gcc_string="${C1}gcc${C2} $gcc_string, " fi fi # check for 64 bit first if [[ -n $( uname -m | grep -o 'x86_64' ) ]];then - bits="(64 bit$gcc_string)" + bits="64 bit" else - bits="(32 bit$gcc_string)" + bits="32 bit" fi + bits="(${gcc_string}${bits})" if [[ $B_SHOW_HOST == 'true' ]];then if [[ -z $HOSTNAME ]];then if [[ -n $( type p hostname ) ]];then