[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: |
Matt Fleming |
Subject: |
Re: [Qemu-devel] [PATCH 5/6] fw_cfg: insert fw_cfg file blobs via qemu cmdline |
Date: |
Tue, 17 Mar 2015 10:55:30 +0000 |
On Mon, 2015-03-16 at 10:15 -0400, Gabriel L. Somlo wrote:
> Allow user supplied files to be inserted into the fw_cfg
> device before starting the guest. Since fw_cfg_add_file()
> already disallows duplicate fw_cfg file names, qemu will
> exit with an error message if the user supplies multiple
> blobs with the same fw_cfg file name, or if a blob name
> collides with a fw_cfg name used internally by qemu.
>
> Signed-off-by: Gabriel Somlo <address@hidden>
> ---
> hw/nvram/fw_cfg.c | 48
> +++++++++++++++++++++++++++++++++++++++++++++++
> include/hw/nvram/fw_cfg.h | 4 ++++
> qemu-options.hx | 10 ++++++++++
> vl.c | 27 ++++++++++++++++++++++++++
> 4 files changed, 89 insertions(+)
[...]
> +void fw_cfg_option_add(QemuOpts *opts)
> +{
> + const char *name = qemu_opt_get(opts, "name");
> + const char *file = qemu_opt_get(opts, "file");
> +
> + if (name == NULL || *name == '\0' || file == NULL || *file == '\0') {
> + error_report("invalid argument value");
> + exit(1);
> + }
Just because I know I'm going to get this wrong when I start using it,
can this error message mention that the fw_cfg argument is invalid,
rather than being ambiguous?
- [Qemu-devel] [PATCH 0/6] fw-cfg: documentation, cleanup, and proposed feature, Gabriel L. Somlo, 2015/03/16
- [Qemu-devel] [PATCH 1/6] fw_cfg: add documentation file (docs/specs/fw_cfg.txt), Gabriel L. Somlo, 2015/03/16
- [Qemu-devel] [PATCH 4/6] fw_cfg: exit with error when dupe fw_cfg file name inserted, Gabriel L. Somlo, 2015/03/16
- [Qemu-devel] [PATCH 5/6] fw_cfg: insert fw_cfg file blobs via qemu cmdline, Gabriel L. Somlo, 2015/03/16
- Re: [Qemu-devel] [PATCH 5/6] fw_cfg: insert fw_cfg file blobs via qemu cmdline, Gabriel L. Somlo, 2015/03/18
- Re: [Qemu-devel] [PATCH 5/6] fw_cfg: insert fw_cfg file blobs via qemu cmdline, Gerd Hoffmann, 2015/03/19
- [Qemu-devel] How to emit errors with nice location information (was: [PATCH 5/6] fw_cfg: insert fw_cfg file blobs via qemu cmdline), Markus Armbruster, 2015/03/19
[Qemu-devel] [PATCH 6/6] qga: RFC: guest-side retrieval of fw_cfg file, Gabriel L. Somlo, 2015/03/16