Skip to contentSkip to conversation

rteval: Make output work with new dmiinfo format

PATCH In review [email protected] 2 participants 2 messages Apr 29, 2024

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 rteval: Make output work with new dmiinfo format

From: Tomas Glozar <[email protected]>

Commit 43c45ba7 ("rteval: Implement initial dmidecode support") re-introduced DMI information into rteval XML summary, but in a different format, which is not correctly picked up in rteval_text.xsl for formatting BIOS and vendor information into rteval text output.

This lead to the information not being displayed correctly:
Model: -
BIOS version: (ver: , rev :, release date: )

Modify the relevant section of rteval_text.xsl to make it understand the new format. Also, adjust the incorrect spacing around "rev".

New output (in QEMU VM):
Model: QEMU - Standard PC (Q35 + ICH9, 2009)
BIOS version: SeaBIOS (ver: 1.16.3-1.fc39, rev: 0.0, release date: 04/01/2014)

---
 rteval/rteval_text.xsl | 14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)
rteval/rteval_text.xsl +7 -7
index 1e9c0f0..2f03bda 100644
@@ -39,18 +39,18 @@
     <xsl:text>&#10;</xsl:text>
 
     <xsl:text>   Model:        </xsl:text>
-    <xsl:value-of select="SystemInfo/DMIinfo/HardwareInfo/GeneralInfo/Manufacturer|HardwareInfo/GeneralInfo/ProductName"/>
-    <xsl:text> - </xsl:text><xsl:value-of select="SystemInfo/DMIinfo/HardwareInfo/GeneralInfo/ProductName|HardwareInfo/GeneralInfo/ProductName"/>
+    <xsl:value-of select="SystemInfo/DMIinfo/Handle[@name='System Information']/Field[@Name='Manufacturer']"/>
+    <xsl:text> - </xsl:text><xsl:value-of select="SystemInfo/DMIinfo/Handle[@name='System Information']/Field[@Name='Product Name']"/>
     <xsl:text>&#10;</xsl:text>
 
     <xsl:text>   BIOS version: </xsl:text>
-    <xsl:value-of select="SystemInfo/DMIinfo/HardwareInfo/BIOS|HardwareInfo/BIOS"/>
+    <xsl:value-of select="SystemInfo/DMIinfo/Handle[@name='BIOS Information']/Field[@Name='Vendor']"/>
     <xsl:text> (ver: </xsl:text>
-    <xsl:value-of select="SystemInfo/DMIinfo/HardwareInfo/BIOS/@Version|HardwareInfo/BIOS/@Version"/>
-    <xsl:text>, rev :</xsl:text>
-    <xsl:value-of select="SystemInfo/DMIinfo/HardwareInfo/BIOS/@BIOSrevision|HardwareInfo/BIOS/@BIOSrevision"/>
+    <xsl:value-of select="SystemInfo/DMIinfo/Handle[@name='BIOS Information']/Field[@Name='Version']"/>
+    <xsl:text>, rev: </xsl:text>
+    <xsl:value-of select="SystemInfo/DMIinfo/Handle[@name='BIOS Information']/Field[@Name='BIOS Revision']"/>
     <xsl:text>, release date: </xsl:text>
-    <xsl:value-of select="SystemInfo/DMIinfo/HardwareInfo/BIOS/@ReleaseDate|HardwareInfo/BIOS/@ReleaseDate"/>
+    <xsl:value-of select="SystemInfo/DMIinfo/Handle[@name='BIOS Information']/Field[@Name='Release Date']"/>
     <xsl:text>)</xsl:text>
     <xsl:text>&#10;&#10;</xsl:text>
 
Signature · 1 line
2.44.0
#1 lore raw
Quoted 44 lines · On Mon, 29 Apr 2024, [email protected] wrote:

From: Tomas Glozar <[email protected]>

Commit 43c45ba7 ("rteval: Implement initial dmidecode support") re-introduced DMI information into rteval XML summary, but in a different format, which is not correctly picked up in rteval_text.xsl for formatting BIOS and vendor information into rteval text output.

This lead to the information not being displayed correctly:
Model: -
BIOS version: (ver: , rev :, release date: )

Modify the relevant section of rteval_text.xsl to make it understand the new format. Also, adjust the incorrect spacing around "rev".

New output (in QEMU VM):
Model: QEMU - Standard PC (Q35 + ICH9, 2009)
BIOS version: SeaBIOS (ver: 1.16.3-1.fc39, rev: 0.0, release date: 04/01/2014)

---
 rteval/rteval_text.xsl | 14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)
rteval/rteval_text.xsl +3 -5
index 1e9c0f0..2f03bda 100644
@@ -39,18 +39,18 @@
     <xsl:text>&#10;</xsl:text>
 
     <xsl:text>   Model:        </xsl:text>
-    <xsl:value-of select="SystemInfo/DMIinfo/HardwareInfo/GeneralInfo/Manufacturer|HardwareInfo/GeneralInfo/ProductName"/>
-    <xsl:text> - </xsl:text><xsl:value-of select="SystemInfo/DMIinfo/HardwareInfo/GeneralInfo/ProductName|HardwareInfo/GeneralInfo/ProductName"/>
+    <xsl:value-of select="SystemInfo/DMIinfo/Handle[@name='System Information']/Field[@Name='Manufacturer']"/>
+    <xsl:text> - </xsl:text><xsl:value-of select="SystemInfo/DMIinfo/Handle[@name='System Information']/Field[@Name='Product Name']"/>
     <xsl:text>&#10;</xsl:text>
 
     <xsl:text>   BIOS version: </xsl:text>
-    <xsl:value-of select="SystemInfo/DMIinfo/HardwareInfo/BIOS|HardwareInfo/BIOS"/>
+    <xsl:value-of select="SystemInfo/DMIinfo/Handle[@name='BIOS Information']/Field[@Name='Vendor']"/>
     <xsl:text> (ver: </xsl:text>
-    <xsl:value-of select="SystemInfo/DMIinfo/HardwareInfo/BIOS/@Version|HardwareInfo/BIOS/@Version"/>
-    <xsl:text>, rev :</xsl:text>

rteval/rteval_text.xsl line 56

Quoted 10 lines
rteval/rteval_text.xsl +4 -2
-    <xsl:value-of select="SystemInfo/DMIinfo/HardwareInfo/BIOS/@BIOSrevision|HardwareInfo/BIOS/@BIOSrevision"/>
+    <xsl:value-of select="SystemInfo/DMIinfo/Handle[@name='BIOS Information']/Field[@Name='Version']"/>
+    <xsl:text>, rev: </xsl:text>
+    <xsl:value-of select="SystemInfo/DMIinfo/Handle[@name='BIOS Information']/Field[@Name='BIOS Revision']"/>
     <xsl:text>, release date: </xsl:text>
-    <xsl:value-of select="SystemInfo/DMIinfo/HardwareInfo/BIOS/@ReleaseDate|HardwareInfo/BIOS/@ReleaseDate"/>
+    <xsl:value-of select="SystemInfo/DMIinfo/Handle[@name='BIOS Information']/Field[@Name='Release Date']"/>
     <xsl:text>)</xsl:text>
     <xsl:text>&#10;&#10;</xsl:text>
 

Thanks