]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
machined: move declaration of manager_object to machined-dbus.h
authorMike Yuan <me@yhndnzj.com>
Wed, 4 Mar 2026 12:49:59 +0000 (13:49 +0100)
committerMike Yuan <me@yhndnzj.com>
Wed, 4 Mar 2026 13:32:16 +0000 (14:32 +0100)
src/machine/machined-dbus.c
src/machine/machined-dbus.h [new file with mode: 0644]
src/machine/machined.c
src/machine/machined.h

index 9010b58fb248c9e4c1927a12878d6b487793c7d6..31237c811a9e7928fbb83f0aed5834c6d437b1db 100644 (file)
@@ -26,6 +26,7 @@
 #include "machine.h"
 #include "machine-dbus.h"
 #include "machined.h"
+#include "machined-dbus.h"
 #include "namespace-util.h"
 #include "operation.h"
 #include "os-util.h"
@@ -1451,8 +1452,8 @@ const BusObjectImplementation manager_object = {
         "/org/freedesktop/machine1",
         "org.freedesktop.machine1.Manager",
         .vtables = BUS_VTABLES(manager_vtable),
-        .children = BUS_IMPLEMENTATIONS( &machine_object,
-                                         &image_object ),
+        .children = BUS_IMPLEMENTATIONS(&machine_object,
+                                        &image_object),
 };
 
 int match_job_removed(sd_bus_message *message, void *userdata, sd_bus_error *error) {
diff --git a/src/machine/machined-dbus.h b/src/machine/machined-dbus.h
new file mode 100644 (file)
index 0000000..7a1d610
--- /dev/null
@@ -0,0 +1,6 @@
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
+#pragma once
+
+#include "machine-forward.h"
+
+extern const BusObjectImplementation manager_object;
index dfb01abea646cfaf8f83b447fbfbd169c4372d49..7c1f57baac3def56d21cd61f624610837e87694e 100644 (file)
@@ -23,6 +23,7 @@
 #include "hostname-util.h"
 #include "machine.h"
 #include "machined.h"
+#include "machined-dbus.h"
 #include "machined-varlink.h"
 #include "main-func.h"
 #include "mkdir-label.h"
index 7c8922ed3e2131cb5c8af5e5f42a8a6831d30517..daba5a9bbd32221591938586c1efdb91fe7a7ec7 100644 (file)
@@ -42,8 +42,6 @@ typedef struct Manager {
 int manager_add_machine(Manager *m, const char *name, Machine **ret);
 int manager_get_machine_by_pidref(Manager *m, const PidRef *pidref, Machine **ret);
 
-extern const BusObjectImplementation manager_object;
-
 int match_reloading(sd_bus_message *message, void *userdata, sd_bus_error *error);
 int match_unit_removed(sd_bus_message *message, void *userdata, sd_bus_error *error);
 int match_properties_changed(sd_bus_message *message, void *userdata, sd_bus_error *error);