]> Git Repo - qemu.git/commitdiff
replication: Make --disable-replication compile again
authorMarkus Armbruster <[email protected]>
Thu, 27 Apr 2017 13:00:53 +0000 (15:00 +0200)
committerStefan Hajnoczi <[email protected]>
Fri, 28 Apr 2017 15:50:16 +0000 (16:50 +0100)
Broken in commit daa33c5.

Cc: [email protected]
Signed-off-by: Markus Armbruster <[email protected]>
Reviewed-by: Eric Blake <[email protected]>
Reviewed-by: Zhang Chen <[email protected]>
Message-id: 1493298053[email protected]
Signed-off-by: Stefan Hajnoczi <[email protected]>
migration/colo.c
monitor.c

index c19eb3f0732e41b930851d828e16ada122380379..963c80256dd4272e254636b2e63c273c0d58826e 100644 (file)
@@ -153,6 +153,7 @@ void qmp_xen_set_replication(bool enable, bool primary,
                              bool has_failover, bool failover,
                              Error **errp)
 {
+#ifdef CONFIG_REPLICATION
     ReplicationMode mode = primary ?
                            REPLICATION_MODE_PRIMARY :
                            REPLICATION_MODE_SECONDARY;
@@ -171,10 +172,14 @@ void qmp_xen_set_replication(bool enable, bool primary,
         }
         replication_stop_all(failover, failover ? NULL : errp);
     }
+#else
+    abort();
+#endif
 }
 
 ReplicationStatus *qmp_query_xen_replication_status(Error **errp)
 {
+#ifdef CONFIG_REPLICATION
     Error *err = NULL;
     ReplicationStatus *s = g_new0(ReplicationStatus, 1);
 
@@ -189,11 +194,18 @@ ReplicationStatus *qmp_query_xen_replication_status(Error **errp)
 
     error_free(err);
     return s;
+#else
+    abort();
+#endif
 }
 
 void qmp_xen_colo_do_checkpoint(Error **errp)
 {
+#ifdef CONFIG_REPLICATION
     replication_do_checkpoint_all(errp);
+#else
+    abort();
+#endif
 }
 
 static void colo_send_message(QEMUFile *f, COLOMessage msg,
index 6289e5256cd297c7f74287ebfef46fb85a4ec95a..62c9f81e8e0092d04a34a44ab6f85fe2119f7228 100644 (file)
--- a/monitor.c
+++ b/monitor.c
@@ -974,6 +974,11 @@ static void qmp_unregister_commands_hack(void)
 #ifndef CONFIG_SPICE
     qmp_unregister_command(&qmp_commands, "query-spice");
 #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
     qmp_unregister_command(&qmp_commands, "rtc-reset-reinjection");
 #endif
This page took 0.032314 seconds and 4 git commands to generate.