From a521abbf272a90d3bd02c1810b5b84bab1cfd154 Mon Sep 17 00:00:00 2001 From: Mike Yuan Date: Wed, 4 Mar 2026 13:49:59 +0100 Subject: [PATCH] machined: move declaration of manager_object to machined-dbus.h --- src/machine/machined-dbus.c | 5 +++-- src/machine/machined-dbus.h | 6 ++++++ src/machine/machined.c | 1 + src/machine/machined.h | 2 -- 4 files changed, 10 insertions(+), 4 deletions(-) create mode 100644 src/machine/machined-dbus.h diff --git a/src/machine/machined-dbus.c b/src/machine/machined-dbus.c index 9010b58fb2..31237c811a 100644 --- a/src/machine/machined-dbus.c +++ b/src/machine/machined-dbus.c @@ -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 index 0000000000..7a1d610c01 --- /dev/null +++ b/src/machine/machined-dbus.h @@ -0,0 +1,6 @@ +/* SPDX-License-Identifier: LGPL-2.1-or-later */ +#pragma once + +#include "machine-forward.h" + +extern const BusObjectImplementation manager_object; diff --git a/src/machine/machined.c b/src/machine/machined.c index dfb01abea6..7c1f57baac 100644 --- a/src/machine/machined.c +++ b/src/machine/machined.c @@ -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" diff --git a/src/machine/machined.h b/src/machine/machined.h index 7c8922ed3e..daba5a9bbd 100644 --- a/src/machine/machined.h +++ b/src/machine/machined.h @@ -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);