summaryrefslogtreecommitdiffstats
path: root/src/oom/oomctl.c
diff options
context:
space:
mode:
authorDavid Tardon <dtardon@redhat.com>2023-05-24 08:40:51 +0200
committerDavid Tardon <dtardon@redhat.com>2023-05-24 08:50:02 +0200
commit3ac26d071830b354bd2439aa9b310d2f3648a748 (patch)
tree0851f5e06dc70f4b116e7bd7372169b89810380e /src/oom/oomctl.c
parentbus-locator: sort the list (diff)
downloadsystemd-3ac26d071830b354bd2439aa9b310d2f3648a748.tar.xz
systemd-3ac26d071830b354bd2439aa9b310d2f3648a748.zip
oomctl: convert a oom1.Manager call to BusLocator
Diffstat (limited to 'src/oom/oomctl.c')
-rw-r--r--src/oom/oomctl.c11
1 files changed, 2 insertions, 9 deletions
diff --git a/src/oom/oomctl.c b/src/oom/oomctl.c
index d18f999841..eb15f508de 100644
--- a/src/oom/oomctl.c
+++ b/src/oom/oomctl.c
@@ -5,6 +5,7 @@
#include "build.h"
#include "bus-error.h"
+#include "bus-locator.h"
#include "copy.h"
#include "main-func.h"
#include "pretty-print.h"
@@ -55,15 +56,7 @@ static int dump_state(int argc, char *argv[], void *userdata) {
pager_open(arg_pager_flags);
- r = sd_bus_call_method(
- bus,
- "org.freedesktop.oom1",
- "/org/freedesktop/oom1",
- "org.freedesktop.oom1.Manager",
- "DumpByFileDescriptor",
- &error,
- &reply,
- NULL);
+ r = bus_call_method(bus, bus_oom_mgr, "DumpByFileDescriptor", &error, &reply, NULL);
if (r < 0)
return log_error_errno(r, "Failed to dump context: %s", bus_error_message(&error, r));