[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH 5/6] fw_cfg: insert fw_cfg file blobs via qemu c
From: |
Gerd Hoffmann |
Subject: |
Re: [Qemu-devel] [PATCH 5/6] fw_cfg: insert fw_cfg file blobs via qemu cmdline |
Date: |
Thu, 19 Mar 2015 08:34:58 +0100 |
Hi,
> + case QEMU_OPTION_fwcfg:
> + opts = qemu_opts_parse(qemu_find_opts("fw_cfg"), optarg, 0);
> + if (opts == NULL) {
> + exit(1);
> + }
That is fine here.
> + fw_cfg_option_add(opts);
That should be called later. There is qemu_opts_foreach() to loop over
all QemuOpts added, you'll find other calls of this in main(). And when
called late enough (after fw_cfg init) you don't need the separate
insert function any more.
Testcase:
(1) qemu -fw_cfg $options -writeconfig fw_cfg_test.cfg
(2) qemu -readconfig fw_cfg_test.cfg
Both (1) and (2) should give the same result.
cheers,
Gerd
- Re: [Qemu-devel] [PATCH 4/6] fw_cfg: exit with error when dupe fw_cfg file name inserted, (continued)
[Qemu-devel] [PATCH 6/6] qga: RFC: guest-side retrieval of fw_cfg file, Gabriel L. Somlo, 2015/03/16
[Qemu-devel] [PATCH 3/6] fw_cfg: assertion to detect memory leak when adding new data blob, Gabriel L. Somlo, 2015/03/16
[Qemu-devel] [PATCH 2/6] fw_cfg: remove support for guest-side data writes, Gabriel L. Somlo, 2015/03/16