提交 38bb54f3 编写于 作者: M Markus Armbruster 提交者: Stefan Hajnoczi

replication: Make --disable-replication compile again

Broken in commit daa33c52.

Cc: qemu-stable@nongnu.org
Signed-off-by: NMarkus Armbruster <armbru@redhat.com>
Reviewed-by: NEric Blake <eblake@redhat.com>
Reviewed-by: NZhang Chen <zhangchen.fnst@cn.fujitsu.com>
Message-id: 1493298053-17140-1-git-send-email-armbru@redhat.com
Signed-off-by: NStefan Hajnoczi <stefanha@redhat.com>
上级 64a6047d
...@@ -153,6 +153,7 @@ void qmp_xen_set_replication(bool enable, bool primary, ...@@ -153,6 +153,7 @@ void qmp_xen_set_replication(bool enable, bool primary,
bool has_failover, bool failover, bool has_failover, bool failover,
Error **errp) Error **errp)
{ {
#ifdef CONFIG_REPLICATION
ReplicationMode mode = primary ? ReplicationMode mode = primary ?
REPLICATION_MODE_PRIMARY : REPLICATION_MODE_PRIMARY :
REPLICATION_MODE_SECONDARY; REPLICATION_MODE_SECONDARY;
...@@ -171,10 +172,14 @@ void qmp_xen_set_replication(bool enable, bool primary, ...@@ -171,10 +172,14 @@ void qmp_xen_set_replication(bool enable, bool primary,
} }
replication_stop_all(failover, failover ? NULL : errp); replication_stop_all(failover, failover ? NULL : errp);
} }
#else
abort();
#endif
} }
ReplicationStatus *qmp_query_xen_replication_status(Error **errp) ReplicationStatus *qmp_query_xen_replication_status(Error **errp)
{ {
#ifdef CONFIG_REPLICATION
Error *err = NULL; Error *err = NULL;
ReplicationStatus *s = g_new0(ReplicationStatus, 1); ReplicationStatus *s = g_new0(ReplicationStatus, 1);
...@@ -189,11 +194,18 @@ ReplicationStatus *qmp_query_xen_replication_status(Error **errp) ...@@ -189,11 +194,18 @@ ReplicationStatus *qmp_query_xen_replication_status(Error **errp)
error_free(err); error_free(err);
return s; return s;
#else
abort();
#endif
} }
void qmp_xen_colo_do_checkpoint(Error **errp) void qmp_xen_colo_do_checkpoint(Error **errp)
{ {
#ifdef CONFIG_REPLICATION
replication_do_checkpoint_all(errp); replication_do_checkpoint_all(errp);
#else
abort();
#endif
} }
static void colo_send_message(QEMUFile *f, COLOMessage msg, static void colo_send_message(QEMUFile *f, COLOMessage msg,
......
...@@ -974,6 +974,11 @@ static void qmp_unregister_commands_hack(void) ...@@ -974,6 +974,11 @@ static void qmp_unregister_commands_hack(void)
#ifndef CONFIG_SPICE #ifndef CONFIG_SPICE
qmp_unregister_command(&qmp_commands, "query-spice"); qmp_unregister_command(&qmp_commands, "query-spice");
#endif #endif
#ifndef CONFIG_REPLICATION
qmp_unregister_command(&qmp_commands, "xen-set-replication");
qmp_unregister_command(&qmp_commands, "query-xen-replication-status");
qmp_unregister_command(&qmp_commands, "xen-colo-do-checkpoint");
#endif
#ifndef TARGET_I386 #ifndef TARGET_I386
qmp_unregister_command(&qmp_commands, "rtc-reset-reinjection"); qmp_unregister_command(&qmp_commands, "rtc-reset-reinjection");
#endif #endif
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册