From daecc5b95b9f4b79bf34626e174c1ec033167bed Mon Sep 17 00:00:00 2001 From: David Tardon Date: Tue, 23 May 2023 20:33:16 +0200 Subject: [PATCH] journalctl: convert a machine1.Manager call to BusLocator --- src/journal/journalctl.c | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/src/journal/journalctl.c b/src/journal/journalctl.c index b0b95311f1c..5f3a121ac9f 100644 --- a/src/journal/journalctl.c +++ b/src/journal/journalctl.c @@ -21,6 +21,7 @@ #include "alloc-util.h" #include "build.h" #include "bus-error.h" +#include "bus-locator.h" #include "bus-util.h" #include "catalog.h" #include "chase.h" @@ -2246,15 +2247,7 @@ static int run(int argc, char *argv[]) { if (r < 0) return log_error_errno(r, "Failed to open system bus: %m"); - r = sd_bus_call_method( - bus, - "org.freedesktop.machine1", - "/org/freedesktop/machine1", - "org.freedesktop.machine1.Manager", - "OpenMachineRootDirectory", - &error, - &reply, - "s", arg_machine); + r = bus_call_method(bus, bus_machine_mgr, "OpenMachineRootDirectory", &error, &reply, "s", arg_machine); if (r < 0) return log_error_errno(r, "Failed to open root directory: %s", bus_error_message(&error, r)); -- 2.47.3