mirror of
https://github.com/smxi/inxi.git
synced 2024-11-16 16:21:39 +00:00
some bug fixes, a small glitch, added debuggers
This commit is contained in:
parent
d2b254fac1
commit
5f09b1555c
23
inxi
23
inxi
|
@ -4888,8 +4888,8 @@ 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 )
|
||||
if [[ -z $dmidecodePath ]];then
|
||||
|
@ -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"
|
||||
|
|
Loading…
Reference in a new issue