qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH v3 1/4] migration: Rename abbreviated macro MIG_


From: Eric Blake
Subject: Re: [Qemu-devel] [PATCH v3 1/4] migration: Rename abbreviated macro MIG_STATE_* to MIGRATION_STATUS_*
Date: Fri, 06 Mar 2015 09:14:19 -0700
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.5.0

On 03/04/2015 07:09 AM, zhanghailiang wrote:
> Signed-off-by: zhanghailiang <address@hidden>
> ---
>  migration/migration.c | 93 
> +++++++++++++++++++++++++++------------------------
>  1 file changed, 50 insertions(+), 43 deletions(-)
> 
> diff --git a/migration/migration.c b/migration/migration.c
> index b3adbc6..0aafbdf 100644
> --- a/migration/migration.c
> +++ b/migration/migration.c
> @@ -27,13 +27,13 @@
>  #include "trace.h"
>  
>  enum {
> -    MIG_STATE_ERROR = -1,
> -    MIG_STATE_NONE,
> -    MIG_STATE_SETUP,
> -    MIG_STATE_CANCELLING,
> -    MIG_STATE_CANCELLED,
> -    MIG_STATE_ACTIVE,
> -    MIG_STATE_COMPLETED,
> +    MIGRATION_STATUS_ERROR = -1,

Please also rename _ERROR to _FAILED in this patch, so that patch 3/4 is
not doing any further renames.  And document that the rename is
intentional in the body of the commit message.


> @@ -251,11 +251,11 @@ MigrationInfo *qmp_query_migrate(Error **errp)
>          info->ram->mbps = s->mbps;
>          info->ram->dirty_sync_count = s->dirty_sync_count;
>          break;
> -    case MIG_STATE_ERROR:
> +    case MIGRATION_STATUS_ERROR:
>          info->has_status = true;
>          info->status = g_strdup("failed");
>          break;

That is, _this_ patch is the one to make the enum name match the public
string.

-- 
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]