New patch version, tarball. Fixed a few small oversights, more debugging added.

Will next try to handle the remaining corner cases if possible.
This commit is contained in:
inxi-svn 2014-08-14 19:24:51 +00:00
parent 38d88507da
commit 5af0c33bac
2 changed files with 32 additions and 7 deletions

22
inxi
View file

@ -2,8 +2,8 @@
########################################################################
#### Script Name: inxi
#### Version: 2.1.95
#### Date: 2014-08-13
#### Patch Number: 03
#### Date: 2014-08-14
#### Patch Number: 04
########################################################################
#### SPECIAL THANKS
########################################################################
@ -4901,7 +4901,7 @@ get_dmidecode_data()
# strip out all the stuff we don't want to see in the results. We want the error data in
# stdout for error handling
if [[ $b_debugger == 'true' ]];then
dmiData="$( cat ~/bin/scripts/inxi/data/dmidecode/dmidecode-memory-variants-1.txt )"
dmiData="$( cat ~/bin/scripts/inxi/data/dmidecode/dmidecode-memory-variants-2.txt )"
else
dmiData="$( $dmidecodePath 2>&1 )"
fi
@ -8368,10 +8368,12 @@ get_ram_data()
# print primaryType "," arrayHandle "," deviceSize "," bankLocator "," locator "," formFactor "," deviceType "," deviceTypeDetail "," deviceSpeed "," configuredClockSpeed "," dataWidth "," totalWidth "," deviceManufacturer "," devicePartNumber "," deviceSerialNumber "," mainLocator
m=0
bPrint="true"
for ( j=0;j<i;j++ ) {
estCap=""
estModuleSize=""
unit=""
if (a_memory[j,0] == "memory-array" ) {
if ( a_memory[j,3] == 0 ) {
a_memory[j,3] = ""
@ -8379,10 +8381,16 @@ get_ram_data()
else {
a_memory[j,3]=int(a_memory[j,3]) # some weird cases believe they are strings!
}
# if ( m < 8 ) {
# bPrint="true"
# }
# else {
# bPrint="false"
# }
#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]
estModuleSize=" (est.)"
estModuleSize=" (est)"
}
if (aMaxModuleSize[m] == 0 ){
aMaxModuleSize[m]=""
@ -8421,7 +8429,7 @@ get_ram_data()
}
else if ( a_memory[j,3] < 1024000000 ) {
a_memory[j,3] = a_memory[j,3] / 1024000
unit=" GB"
unit=" TB"
}
a_memory[j,3]=gensub(/([0-9]+\.[0-9][0-9]).*/,"\\1",1,a_memory[j,3])
a_memory[j,3] = a_memory[j,3] unit estCap
@ -8429,13 +8437,17 @@ get_ram_data()
if ( aMaxModuleSize[m] != "" ){
aMaxModuleSize[m]=aMaxModuleSize[m] " MB"
}
if ( bPrint == "true" ){
print a_memory[j,0] "," a_memory[j,1] "," a_memory[j,2] "," a_memory[j,3] "," a_memory[j,4] "," a_memory[j,5] "," a_memory[j,6] "," aMaxModuleSize[m] estModuleSize "," a_memory[j,8]
}
m++
}
else {
if ( bPrint == "true" ){
print a_memory[j,0] "," a_memory[j,1] "," a_memory[j,2] "," a_memory[j,3] "," a_memory[j,4] "," a_memory[j,5] "," a_memory[j,6] "," a_memory[j,7] "," a_memory[j,8] "," a_memory[j,9] "," a_memory[j,10] "," a_memory[j,11] "," a_memory[j,12] "," a_memory[j,13] "," a_memory[j,14] "," a_memory[j,15]
}
}
}
}' <<< "$DMIDECODE_DATA" ) )
fi
fi

View file

@ -1,3 +1,16 @@
=====================================================================================
Version: 2.1.95
Patch Version: 04
Script Date: 2014-08-14
-----------------------------------
Changes:
-----------------------------------
New patch version, tarball. Fixed a few small oversights, more debugging added.
Will next try to handle the remaining corner cases if possible.
-----------------------------------
-- Harald Hope - Thu, 14 Aug 2014 12:23:38 -0700
=====================================================================================
Version: 2.1.95
Patch Version: 01