From fcb9adf33ab1fd39b4e85aacbad81a846af718db Mon Sep 17 00:00:00 2001 From: inxi-svn Date: Thu, 7 Aug 2014 22:04:27 +0000 Subject: [PATCH] branch one, cleanup --- inxi | 19 ++----------------- 1 file changed, 2 insertions(+), 17 deletions(-) diff --git a/inxi b/inxi index 874b417..7e57a74 100755 --- a/inxi +++ b/inxi @@ -6333,7 +6333,7 @@ get_networking_data() A_NETWORK_DATA=( $( echo "$Lspci_v_Data" | gawk ' # NOTE: see version 2.1.28 or earlier for old logic if for some reason it is needed again - # that used a modified string made from nic name, why, I have no idea, makes no sense and leads + # that used a modified string made from nic name for index, why, I have no idea, makes no sense and leads # to wrong ordered output as well. BEGIN { IGNORECASE=1 @@ -6348,12 +6348,7 @@ get_networking_data() gsub(/,/, " ", aNic[counter]) gsub(/^ +| +$/, "", aNic[counter]) gsub(/ [ \t]+/, " ", aNic[counter]) - # NOT USED: construct a unique string ending for each device type detected, this allows for - # multiple instances of the same exact devices, ie, dual gigabit, virtual devices, etc - # nic = counter "*" nic "~~" counter++ aPciBusId[counter] = gensub(/(^[0-9a-f:\.]+) [^:]+: .+$/,"\\1","g",$0) - # NOT USED: I do not understand why incrementing a string index makes sense? - # eth[nic]++ while ( getline && !/^$/ ) { gsub(/,/, "", $0) if ( /^[[:space:]]*I\/O/ ) { @@ -6370,20 +6365,13 @@ get_networking_data() } END { - j=0 for (i=0;i 1 ) { -# a[j] = eth[i] "x " i -# } -# else { -# a[j] = i -# } + ## note: this loses the plural ports case, is it needed anyway? if ( aPorts[i] != "" ) { usePorts = aPorts[i] @@ -6401,11 +6389,8 @@ get_networking_data() usePciBusId = aPciBusId[i] } # create array primary item for master array - # NOT USED: and strip out the counter again, this handled dual cards with same chipset - # sub( /~~[0-9]+$/, "", a[j] ) sub( / $/, "", usePorts ) # clean off trailing whitespace print useNic "," useDrivers "," usePorts "," useModules, "," usePciBusId - # j++ } }' ) ) IFS="$ORIGINAL_IFS"