some bug fixes, a small glitch, added debuggers

This commit is contained in:
inxi-svn 2014-08-14 04:08:54 +00:00
parent d2b254fac1
commit 5f09b1555c

21
inxi
View file

@ -4888,7 +4888,7 @@ get_dmidecode_data()
{
eval $LOGFS
local dmiData=""
local dmiData="" b_debugger='false'
if [[ $B_DMIDECODE_SET != 'true' ]];then
dmidecodePath=$( type -p dmidecode 2>/dev/null )
@ -4900,8 +4900,12 @@ get_dmidecode_data()
# used to separate results. Then we remove the doubled empty lines to keep it clean and
# strip out all the stuff we don't want to see in the results. We want the error data in
# stdout for error handling
# DMIDECODE_DATA="$( echo "$dmiData" | gawk -F ':' '
DMIDECODE_DATA="$( $dmidecodePath 2>&1 | gawk -F ':' '
if [[ $b_debugger == 'true' ]];then
dmiData="$( cat ~/bin/scripts/inxi/data/dmidecode/dmidecode-memory-variants-1.txt )"
else
dmiData="$( $dmidecodePath 2>&1 )"
fi
DMIDECODE_DATA="$( echo "$dmiData" | gawk -F ':' '
BEGIN {
IGNORECASE=1
cutExtraTab="false"
@ -8369,9 +8373,12 @@ get_ram_data()
if ( a_memory[j,3] == 0 ) {
a_memory[j,3] = ""
}
# print "mms:" aMaxModuleSize[m] ":dms:" aDerivedModuleSize[m]
else {
a_memory[j,3]=int(a_memory[j,3]) # some weird cases believe they are strings!
}
#print "mms:" aMaxModuleSize[m] ":dms:" aDerivedModuleSize[m] ":mc:" a_memory[j,3]
if (aMaxModuleSize[m] != 0 && aDerivedModuleSize[m] != 0 && aDerivedModuleSize[m] > aMaxModuleSize[m]){
aMaxModuleSize[m]=aDerivedModuleSize[m]
aMaxModuleSize[m]=int(aDerivedModuleSize[m])
estModuleSize=" (est.)"
}
if (aMaxModuleSize[m] == 0 ){
@ -8384,13 +8391,13 @@ get_ram_data()
estCap=" (est)"
}
}
# print "mms:" aMaxModuleSize[m] ":dms:" aDerivedModuleSize[m] ":mc:" a_memory[j,3]
#print "mms:" aMaxModuleSize[m] ":dms:" aDerivedModuleSize[m] ":mc:" a_memory[j,3]
# some cases of type 5 have too big module max size, just dump the data then
if ( aMaxModuleSize[m] != "" && a_memory[j,3] != "" && ( aMaxModuleSize[m] > a_memory[j,3] ) ){
aMaxModuleSize[m] = ""
# print "yes"
}
if (a_memory[j,3] != "" ) {
a_memory[j,3]=int(a_memory[j,3]) # some weird cases believe they are strings!
if ( a_memory[j,3] < 1024 ) {
a_memory[j,3] = a_memory[j,3]
unit=" MB"