On Wed, Sep 09, 2020 at 10:18:47AM +0200, Laszlo Ersek wrote: > On 09/08/20 18:54, Daniel P. Berrangé wrote: > > Some applications want to pass quite large values for the OEM strings > > entries. Rather than having huge strings on the command line, it would > > be better to load them from a file, as supported with -fw_cfg. > > > > This introduces the "valuefile" parameter allowing for: > > > > $ echo -n "thisthing" > mydata.txt > > $ qemu-system-x86_64 \ > > -smbios type=11,value=something \ > > -smbios type=11,valuefile=mydata.txt \ > > -smbios type=11,value=somemore \ > > ...other args... > > > > Now in the guest > > > > $ dmidecide -t 11 > > Getting SMBIOS data from sysfs. > > SMBIOS 2.8 present. > > > > Handle 0x0E00, DMI type 11, 5 bytes > > OEM Strings > > String 1: something > > String 2: thisthing > > String 3: somemore > > > > Signed-off-by: Daniel P. Berrangé <berra...@redhat.com> > > --- > > hw/smbios/smbios.c | 72 +++++++++++++++++++++++++++++++++++++--------- > > 1 file changed, 59 insertions(+), 13 deletions(-) > > (gearing up to test this / look into the edk2 problem, just one question > in passing: could we / would we simplify this with g_file_get_contents()?)
Yes, but at the cost of loosing the ability to pass in a pre-opened FD, which qemu_open allows for. Regards, Daniel -- |: https://berrange.com -o- https://www.flickr.com/photos/dberrange :| |: https://libvirt.org -o- https://fstop138.berrange.com :| |: https://entangle-photo.org -o- https://www.instagram.com/dberrange :|