[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH 3/7] vl: New qemu_get_machine_opts()
From: |
Peter Maydell |
Subject: |
Re: [Qemu-devel] [PATCH 3/7] vl: New qemu_get_machine_opts() |
Date: |
Thu, 4 Jul 2013 15:38:37 +0100 |
On 4 July 2013 14:09, Markus Armbruster <address@hidden> wrote:
>
> +/**
> + * Get machine options
> + *
> + * Returns: machine options (never null).
> + */
> +QemuOpts *qemu_get_machine_opts(void)
> +{
> + QemuOptsList *list;
> + QemuOpts *opts;
> +
> + list = qemu_find_opts("machine");
> + assert(list);
> + opts = qemu_opts_find(list, NULL);
> + if (!opts) {
> + opts = qemu_opts_create_nofail(list);
> + }
> + return opts;
> +}
This looks a bit odd -- why are we creating new
options in a function that claims to only be querying
them?
thanks
-- PMM
[Qemu-devel] [PATCH 2/7] qemu-option: Fix qemu_opts_set_defaults() for corner cases, Markus Armbruster, 2013/07/04
[Qemu-devel] [PATCH 1/7] qemu-option: Fix qemu_opts_find() for null id arguments, Markus Armbruster, 2013/07/04