qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [RFC PATCH v5 03/31] replay: global variables and funct


From: Eric Blake
Subject: Re: [Qemu-devel] [RFC PATCH v5 03/31] replay: global variables and function stubs
Date: Wed, 26 Nov 2014 08:32:15 -0700
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.2.0

On 11/26/2014 03:39 AM, Pavel Dovgalyuk wrote:
> This patch adds global variables, defines, functions declarations,
> and function stubs for deterministic VM replay used by external modules.
> 
> Signed-off-by: Pavel Dovgalyuk <address@hidden>
> ---


> +# Since: 2.3
> +##
> +{ 'enum': 'ReplaySubmode',
> +  'data': [ 'unknown', 'normal' ] }
> diff --git a/replay/Makefile.objs b/replay/Makefile.objs

> +++ b/stubs/replay.c
> @@ -0,0 +1,8 @@
> +#include "replay/replay.h"
> +
> +ReplayMode replay_mode;
> +
> +ReplaySubmode replay_get_play_submode(void)
> +{
> +    return 0;

Although QMP code generation happens to assign 0 to the first listed
enum (in this case, REPLAY_SUBMODE_UNKNOWN), it is safer to explicitly
use an enum value rather than an open-coded '0' in this function.

-- 
Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature


reply via email to

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