mirror of
https://github.com/smxi/inxi.git
synced 2024-11-16 16:21:39 +00:00
trying bug fix for corner case capacity issue
This commit is contained in:
parent
2709f5120b
commit
8da1e3bfd8
18
inxi
18
inxi
|
@ -3,7 +3,7 @@
|
||||||
#### Script Name: inxi
|
#### Script Name: inxi
|
||||||
#### Version: 2.1.95
|
#### Version: 2.1.95
|
||||||
#### Date: 2014-08-13
|
#### Date: 2014-08-13
|
||||||
#### Patch Number: 01
|
#### Patch Number: 02
|
||||||
########################################################################
|
########################################################################
|
||||||
#### SPECIAL THANKS
|
#### SPECIAL THANKS
|
||||||
########################################################################
|
########################################################################
|
||||||
|
@ -8143,6 +8143,7 @@ get_ram_data()
|
||||||
location=""
|
location=""
|
||||||
locator=""
|
locator=""
|
||||||
aDerivedModuleSize[0]=0
|
aDerivedModuleSize[0]=0
|
||||||
|
aFoundModules[0]=0
|
||||||
aMaxCapacity[0]=0
|
aMaxCapacity[0]=0
|
||||||
aMaxModuleSize[0]=0
|
aMaxModuleSize[0]=0
|
||||||
moduleVoltage=""
|
moduleVoltage=""
|
||||||
|
@ -8226,8 +8227,7 @@ get_ram_data()
|
||||||
a_memory[i,6]=errorCorrection
|
a_memory[i,6]=errorCorrection
|
||||||
a_memory[i,7]=aMaxModuleSize[k]
|
a_memory[i,7]=aMaxModuleSize[k]
|
||||||
a_memory[i,8]=moduleVoltage
|
a_memory[i,8]=moduleVoltage
|
||||||
|
|
||||||
# print primaryType "," arrayHandle "," location "," maxCapacity "," numberOfDevices "," use "," errorCorrection "," maxModuleSize "," moduleVoltage
|
|
||||||
# reset
|
# reset
|
||||||
primaryType=""
|
primaryType=""
|
||||||
arrayHandle=""
|
arrayHandle=""
|
||||||
|
@ -8241,6 +8241,7 @@ get_ram_data()
|
||||||
aMaxCapacity[k]=0
|
aMaxCapacity[k]=0
|
||||||
aMaxModuleSize[k]=0
|
aMaxModuleSize[k]=0
|
||||||
aDerivedModuleSize[k]=0
|
aDerivedModuleSize[k]=0
|
||||||
|
aFoundModules[k]=0
|
||||||
}
|
}
|
||||||
/^Handle .* DMI type 17/ {
|
/^Handle .* DMI type 17/ {
|
||||||
primaryType="memory-device"
|
primaryType="memory-device"
|
||||||
|
@ -8257,6 +8258,9 @@ get_ram_data()
|
||||||
if ( $1 == "Size") {
|
if ( $1 == "Size") {
|
||||||
# do not try to guess from installed modules, only use this to correct type 5 data
|
# do not try to guess from installed modules, only use this to correct type 5 data
|
||||||
aDerivedModuleSize[k-1]=calculateSize($2,aDerivedModuleSize[k-1])
|
aDerivedModuleSize[k-1]=calculateSize($2,aDerivedModuleSize[k-1])
|
||||||
|
if ( aDerivedModuleSize[k-1] ~ /^[0-9]+$/ ){
|
||||||
|
aFoundModules[k-1]++
|
||||||
|
}
|
||||||
#print aDerivedModuleSize[k-1] " dm:"k":mm " aMaxModuleSize[k-1]
|
#print aDerivedModuleSize[k-1] " dm:"k":mm " aMaxModuleSize[k-1]
|
||||||
deviceSize=$2
|
deviceSize=$2
|
||||||
}
|
}
|
||||||
|
@ -8323,7 +8327,6 @@ get_ram_data()
|
||||||
dataWidth=totalWidth
|
dataWidth=totalWidth
|
||||||
totalWidth=tempWidth
|
totalWidth=tempWidth
|
||||||
}
|
}
|
||||||
# print primaryType "," arrayHandle "," deviceSize "," bankLocator "," locator "," formFactor "," deviceType "," deviceTypeDetail "," deviceSpeed "," configuredClockSpeed "," dataWidth "," totalWidth "," deviceManufacturer "," devicePartNumber "," deviceSerialNumber "," mainLocator
|
|
||||||
a_memory[i,0]=primaryType
|
a_memory[i,0]=primaryType
|
||||||
a_memory[i,1]=arrayHandle
|
a_memory[i,1]=arrayHandle
|
||||||
a_memory[i,2]=deviceSize
|
a_memory[i,2]=deviceSize
|
||||||
|
@ -8387,9 +8390,10 @@ get_ram_data()
|
||||||
if (aMaxModuleSize[m] != "") {
|
if (aMaxModuleSize[m] != "") {
|
||||||
aMaxModuleSize[m]=int(aMaxModuleSize[m])
|
aMaxModuleSize[m]=int(aMaxModuleSize[m])
|
||||||
}
|
}
|
||||||
if (a_memory[j,3] != "" && a_memory[j,4] != "" ) {
|
# note: some cases memory capacity == max module size, so one stick will fill it
|
||||||
if ( a_memory[j,3] < ( a_memory[j,4] * aDerivedModuleSize[m] ) ) {
|
if (a_memory[j,3] != "" && aFoundModules[m] != 0 ) {
|
||||||
a_memory[j,3] = a_memory[j,4] * aDerivedModuleSize[m]
|
if ( a_memory[j,3] < aDerivedModuleSize[m] * aFoundModules[m] ) {
|
||||||
|
a_memory[j,3] = aDerivedModuleSize[m] * aFoundModules[m]
|
||||||
estCap=" (est)"
|
estCap=" (est)"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue