From 8c366d4cc3d39daba548b191d247da4b33f586a1 Mon Sep 17 00:00:00 2001 From: inxi-svn Date: Thu, 18 Sep 2014 04:03:08 +0000 Subject: [PATCH] branch one, test --- inxi | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/inxi b/inxi index c57ff1a..e1c45da 100755 --- a/inxi +++ b/inxi @@ -5,7 +5,7 @@ #### Script Name: inxi #### Version: 2.2.5 #### Date: 2014-09-17 -#### Patch Number: 04-b1 +#### Patch Number: 05-b1 ######################################################################## #### SPECIAL THANKS ######################################################################## @@ -4024,9 +4024,10 @@ get_cpu_data_bsd() BEGIN { IGNORECASE=1 } + # NOTE: freebsd may say: 2300-MHz, so check for dash as well $1 ~ /^(CPU|cpu0)$/ { - if ( $NF ~ /[^0-9\.][0-9\.]+[-[:space:]]*[MG]Hz/) { - max=gensub(/.*[^0-9\.]([0-9\.]+[-[:space:]]*[MG]Hz).*/,"\\1",1,$NF) + if ( $NF ~ /[^0-9\.][0-9\.]+[\-[:space:]]*[MG]Hz/) { + max=gensub(/.*[^0-9\.]([0-9\.]+[\-[:space:]]*[MG]Hz).*/,"\\1",1,$NF) if (max ~ /MHz/) { sub(/[-[:space:]]*MHz/,"",max) } @@ -4064,13 +4065,13 @@ get_cpu_data_bsd() if ( $NF ~ /[0-9]+[[:space:]]*[KM]B[[:space:]]+L2 cache/) { cpuCache=gensub(/.*[^0-9]([0-9]+[[:space:]]*[KM]B)[[:space:]]+L2 cach.*/,"\\1",1,$NF) } - if ( $NF ~ /[^0-9\.][0-9\.]+[-[:space:]]*[MG]Hz/) { - max=gensub(/.*[^0-9\.]([0-9\.]+[-[:space:]]*[MG]Hz).*/,"\\1",1,$NF) + if ( $NF ~ /[^0-9\.][0-9\.]+[\-[:space:]]*[MG]Hz/) { + max=gensub(/.*[^0-9\.]([0-9\.]+[\-[:space:]]*[MG]Hz).*/,"\\1",1,$NF) if (max ~ /MHz/) { - sub(/[-[:space:]]*MHz/,"",max) + sub(/[\-[:space:]]*MHz/,"",max) } if (max ~ /GHz/) { - sub(/[-[:space:]]*GHz/,"",max) + sub(/[\-[:space:]]*GHz/,"",max) max=max*1000 } }