mirror of
https://github.com/libvirt/libvirt.git
synced 2025-02-25 18:55:26 -06:00
virsysinfo: Parse OEM strings
Setting OEM strings for a domain was introduced in v4.1.0-rc1~315. However, any application that wanted to use them (e.g. to point to an URL where a config file is stored) had to 'dmidecode -u --oem-string N' (where N is index of the string). Well, we can expose them under our <sysinfo/> XML and if the domain is running Libvirt inside it can be obtained using virConnectGetSysinfo() API. Signed-off-by: Michal Privoznik <mprivozn@redhat.com> Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
This commit is contained in:
@@ -81,3 +81,9 @@ Memory Device
|
||||
Serial Number: 29057112
|
||||
Asset Tag: 0839
|
||||
Part Number: IMSH2GS13A1F1C-10F
|
||||
|
||||
OEM Strings
|
||||
String 1: Hello
|
||||
String 2: World
|
||||
String 3: Ha ha ha try parsing\n. String 3: this correctly. String 4:then
|
||||
String 4: This is, more tricky value=escaped
|
||||
|
||||
@@ -50,4 +50,12 @@
|
||||
<entry name='serial_number'>29057112</entry>
|
||||
<entry name='part_number'>IMSH2GS13A1F1C-10F</entry>
|
||||
</memory_device>
|
||||
<oemStrings>
|
||||
<entry>Hello</entry>
|
||||
<entry>World</entry>
|
||||
<entry>Ha ha ha try parsing\n
|
||||
String 3: this correctly
|
||||
String 4:then</entry>
|
||||
<entry>This is, more tricky value=escaped</entry>
|
||||
</oemStrings>
|
||||
</sysinfo>
|
||||
|
||||
Reference in New Issue
Block a user