qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH 02/11] vmstate: register all VMStateDescriptions


From: Peter Maydell
Subject: Re: [Qemu-devel] [PATCH 02/11] vmstate: register all VMStateDescriptions
Date: Wed, 23 Mar 2011 12:30:42 +0000

On 23 March 2011 00:16, Anthony Liguori <address@hidden> wrote:
> This is a purely mechanical change.

> +/* Register the VMState Description to support VMState introspection */
> +static void init_vmstate_description_0(void)
> +{
> +    register_vmstate_description(&vmstate_ac97);
> +}
> +
> +vmstate_init(init_vmstate_description_0);
> +

> +/* Register the VMState Description to support VMState introspection */
> +static void init_vmstate_description_0(void)
> +{
> +    register_vmstate_description(&vmstate_acpi);
> +}
> +
> +vmstate_init(init_vmstate_description_0);
> +

Do we really need five lines of boilerplate for every device?

(I'm wondering if there's some way you could avoid having
all this for the common case where the vmstate is pointed to
by the DeviceInfo struct, given that we already register
all the devices. Failing that, some sort of macro...)

-- PMM



reply via email to

[Prev in Thread] Current Thread [Next in Thread]