]> git.proxmox.com Git - mirror_qemu.git/commitdiff
colo: move stubs out of stubs/
authorPaolo Bonzini <pbonzini@redhat.com>
Mon, 8 Apr 2024 15:53:27 +0000 (17:53 +0200)
committerPaolo Bonzini <pbonzini@redhat.com>
Thu, 18 Apr 2024 09:17:27 +0000 (11:17 +0200)
Since the colo stubs are needed exactly when the build options are not
enabled, move them together with the code they stub.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Message-ID: <20240408155330.522792-16-pbonzini@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
migration/colo-stubs.c [new file with mode: 0644]
migration/meson.build
net/colo-stubs.c [new file with mode: 0644]
net/meson.build
stubs/colo-compare.c [deleted file]
stubs/colo.c [deleted file]
stubs/meson.build

diff --git a/migration/colo-stubs.c b/migration/colo-stubs.c
new file mode 100644 (file)
index 0000000..f8c069b
--- /dev/null
@@ -0,0 +1,36 @@
+#include "qemu/osdep.h"
+#include "qemu/notify.h"
+#include "net/colo-compare.h"
+#include "migration/colo.h"
+#include "qemu/error-report.h"
+#include "qapi/qapi-commands-migration.h"
+
+void colo_shutdown(void)
+{
+}
+
+int coroutine_fn colo_incoming_co(void)
+{
+    return 0;
+}
+
+void colo_checkpoint_delay_set(void)
+{
+}
+
+void migrate_start_colo_process(MigrationState *s)
+{
+    error_report("Impossible happened: trying to start COLO when COLO "
+                 "module is not built in");
+    abort();
+}
+
+bool migration_in_colo_state(void)
+{
+    return false;
+}
+
+bool migration_incoming_in_colo_state(void)
+{
+    return false;
+}
index 1eeb915ff6398536d115f52e17c91a81ef1966d1..f76b1ba3289550cb68ab2902f1db513bcd91783b 100644 (file)
@@ -34,6 +34,8 @@ system_ss.add(files(
 
 if get_option('replication').allowed()
   system_ss.add(files('colo-failover.c', 'colo.c'))
+else
+  system_ss.add(files('colo-stubs.c'))
 endif
 
 system_ss.add(when: rdma, if_true: files('rdma.c'))
diff --git a/net/colo-stubs.c b/net/colo-stubs.c
new file mode 100644 (file)
index 0000000..ec72666
--- /dev/null
@@ -0,0 +1,7 @@
+#include "qemu/osdep.h"
+#include "qemu/notify.h"
+#include "net/colo-compare.h"
+
+void colo_compare_cleanup(void)
+{
+}
index 9432a588e4e77b0726365145347670958805c841..e0cd71470e0e3f524ca9b4fc29822965d2b61367 100644 (file)
@@ -20,6 +20,8 @@ if get_option('replication').allowed() or \
     get_option('colo_proxy').allowed()
   system_ss.add(files('colo-compare.c'))
   system_ss.add(files('colo.c'))
+else
+  system_ss.add(files('colo-stubs.c'))
 endif
 
 if get_option('colo_proxy').allowed()
diff --git a/stubs/colo-compare.c b/stubs/colo-compare.c
deleted file mode 100644 (file)
index ec72666..0000000
+++ /dev/null
@@ -1,7 +0,0 @@
-#include "qemu/osdep.h"
-#include "qemu/notify.h"
-#include "net/colo-compare.h"
-
-void colo_compare_cleanup(void)
-{
-}
diff --git a/stubs/colo.c b/stubs/colo.c
deleted file mode 100644 (file)
index f8c069b..0000000
+++ /dev/null
@@ -1,36 +0,0 @@
-#include "qemu/osdep.h"
-#include "qemu/notify.h"
-#include "net/colo-compare.h"
-#include "migration/colo.h"
-#include "qemu/error-report.h"
-#include "qapi/qapi-commands-migration.h"
-
-void colo_shutdown(void)
-{
-}
-
-int coroutine_fn colo_incoming_co(void)
-{
-    return 0;
-}
-
-void colo_checkpoint_delay_set(void)
-{
-}
-
-void migrate_start_colo_process(MigrationState *s)
-{
-    error_report("Impossible happened: trying to start COLO when COLO "
-                 "module is not built in");
-    abort();
-}
-
-bool migration_in_colo_state(void)
-{
-    return false;
-}
-
-bool migration_incoming_in_colo_state(void)
-{
-    return false;
-}
index a4404e765ab105a3e1e412f4c84633b9462c51ca..a252bffad00e960136a8c557dfe1e34370f6812e 100644 (file)
@@ -42,8 +42,6 @@ stub_ss.add(files('target-get-monitor-def.c'))
 stub_ss.add(files('target-monitor-defs.c'))
 stub_ss.add(files('trace-control.c'))
 stub_ss.add(files('uuid.c'))
-stub_ss.add(files('colo.c'))
-stub_ss.add(files('colo-compare.c'))
 stub_ss.add(files('vmstate.c'))
 stub_ss.add(files('vm-stop.c'))
 stub_ss.add(files('win32-kbd-hook.c'))