Skip to content

Commit fd0d076

Browse files
author
David Sommerseth
committed
Completed python XML map for TypeMap 0x06
1 parent 6bd9742 commit fd0d076

2 files changed

Lines changed: 28 additions & 3 deletions

File tree

src/dmidecode.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1464,10 +1464,10 @@ void dmi_memory_module_connections(xmlNode *node, u8 code)
14641464

14651465
if(code != 0xFF) {
14661466
if((code & 0xF0) != 0xF0) {
1467-
dmixml_AddTextContent(data_n, "%ld", (code >> 4));
1467+
dmixml_AddTextChild(data_n, "Connection", "%ld", (code >> 4));
14681468
}
14691469
if((code & 0x0F) != 0x0F) {
1470-
dmixml_AddTextContent(data_n, "%ld", (code & 0x0F));
1470+
dmixml_AddTextChild(data_n, "Connection", "%ld", (code & 0x0F));
14711471
}
14721472
}
14731473
}

src/pymap.xml

Lines changed: 26 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -208,8 +208,33 @@
208208
</Map>
209209
</TypeMap>
210210

211-
<!-- FIXME : Type 06 : Memory Module -->
211+
<!-- Type 06 : Memory Module -->
212212
<TypeMap id="0x06">
213+
<Map rootpath="/dmidecode/MemoryModuleInfo" keytype="string" key="@handle" valuetype="dict">
214+
<Map keytype="constant" key="dmi_type" valuetype="integer" value="@type"/>
215+
<Map keytype="constant" key="dmi_handle" valuetype="string" value="@handle"/>
216+
<Map keytype="constant" key="dmi_size" valuetype="integer" value="@size"/>
217+
<Map keytype="constant" key="data" valuetype="dict">
218+
<Map keytype="constant" key="Bank Connections"
219+
valuetype="list:integer" value="BankConnections/Connection"/>
220+
<Map keytype="constant" key="Current Speed"
221+
valuetype="string" value="concat(ModuleSpeed,' ',ModuleSpeed/@unit)" emptyValue="Unknown"/>
222+
<Map keytype="constant" key="Enabled Size" valuetype="dict">
223+
<Map keytype="constant" key="Connection" valuetype="string" value="EnabledSize/@Connection"/>
224+
<Map keytype="constant" key="Size"
225+
valuetype="string" value="concat(EnabledSize,' ',EnabledSize/@unit)"/>
226+
</Map>
227+
<Map keytype="constant" key="Error Status" valuetype="boolean" value="ModuleErrorStatus/@Error"/>
228+
<Map keytype="constant" key="Installed Size" valuetype="dict">
229+
<Map keytype="constant" key="Connection" valuetype="string" value="InstalledSize/@Connection"/>
230+
<Map keytype="constant" key="Size"
231+
valuetype="string" value="concat(InstalledSize,' ',InstalledSize/@unit)"/>
232+
</Map>
233+
<Map keytype="constant" key="Socket Designation" valuetype="string" value="SocketDesignation"/>
234+
<Map keytype="constant" key="Type"
235+
valuetype="list:string" value="Type/ModuleType" fixedsize="11" index_attr="index"/>
236+
</Map>
237+
</Map>
213238
</TypeMap>
214239

215240
<!-- Type 07 : Cache -->

0 commit comments

Comments
 (0)