On 2015/3/7 0:14, Eric Blake wrote:
On 03/04/2015 07:09 AM, zhanghailiang wrote:
Signed-off-by: zhanghailiang <zhang.zhanghaili...@huawei.com>
---
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.
OK, will fix in v4~
@@ -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.