mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-08 18:23:57 -06:00
hw/nvram/fw_cfg: Pass QOM parent to fw_cfg_add_file_from_generator()
Currently fw_cfg_add_file_from_generator() is restricted to command line created objects which reside in the '/objects' QOM container. In order to extend to other types of containers, pass the QOM parent by argument. Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org> Reviewed-by: Daniel P. Berrangé <berrange@redhat.com> Message-Id: <20241206181352.6836-3-philmd@linaro.org>
This commit is contained in:
parent
e20a4425ca
commit
51680269fe
3 changed files with 14 additions and 10 deletions
|
@ -1184,7 +1184,8 @@ static int parse_fw_cfg(void *opaque, QemuOpts *opts, Error **errp)
|
|||
size = strlen(str); /* NUL terminator NOT included in fw_cfg blob */
|
||||
buf = g_memdup(str, size);
|
||||
} else if (nonempty_str(gen_id)) {
|
||||
if (!fw_cfg_add_file_from_generator(fw_cfg, name, gen_id, errp)) {
|
||||
if (!fw_cfg_add_file_from_generator(fw_cfg, object_get_objects_root(),
|
||||
gen_id, name, errp)) {
|
||||
return -1;
|
||||
}
|
||||
return 0;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue