summaryrefslogtreecommitdiffstats
path: root/src/oom/oomd-manager-bus.c
diff options
context:
space:
mode:
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2020-10-15 15:03:49 +0200
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2020-10-15 15:03:49 +0200
commitc9a00f5a3bccf8b43e0d7672185da8df5ff0fdfa (patch)
tree963c6bab23cc4b5c5f04330029eef312c1cdf94f /src/oom/oomd-manager-bus.c
parentoomd: check number of arguments, add --version, fix indentation (diff)
downloadsystemd-c9a00f5a3bccf8b43e0d7672185da8df5ff0fdfa.tar.xz
systemd-c9a00f5a3bccf8b43e0d7672185da8df5ff0fdfa.zip
oomd: add names to dbus parameters and implement --bus-introspection
Diffstat (limited to 'src/oom/oomd-manager-bus.c')
-rw-r--r--src/oom/oomd-manager-bus.c15
1 files changed, 13 insertions, 2 deletions
diff --git a/src/oom/oomd-manager-bus.c b/src/oom/oomd-manager-bus.c
index 67c5fbf92f..0f39a60d9e 100644
--- a/src/oom/oomd-manager-bus.c
+++ b/src/oom/oomd-manager-bus.c
@@ -29,8 +29,19 @@ static int bus_method_dump_by_fd(sd_bus_message *message, void *userdata, sd_bus
return sd_bus_reply_method_return(message, "h", fd);
}
-const sd_bus_vtable manager_vtable[] = {
+static const sd_bus_vtable manager_vtable[] = {
SD_BUS_VTABLE_START(0),
- SD_BUS_METHOD("DumpByFileDescriptor", NULL, "h", bus_method_dump_by_fd, SD_BUS_VTABLE_UNPRIVILEGED),
+ SD_BUS_METHOD_WITH_NAMES("DumpByFileDescriptor",
+ NULL,,
+ "h",
+ SD_BUS_PARAM(fd),
+ bus_method_dump_by_fd,
+ SD_BUS_VTABLE_UNPRIVILEGED),
SD_BUS_VTABLE_END
};
+
+const BusObjectImplementation manager_object = {
+ "/org/freedesktop/oom1",
+ "org.freedesktop.oom1.Manager",
+ .vtables = BUS_VTABLES(manager_vtable),
+};