oomctl: convert a oom1.Manager call to BusLocator
This commit is contained in:
+2
-9
@@ -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));
|
||||
|
||||
|
||||
Reference in New Issue
Block a user