Debian Codegraph @

src/analyze/analyze-log-control.c

raw
1 /* SPDX-License-Identifier: LGPL-2.1-or-later */
2
3 #include "sd-bus.h"
4
5 #include "analyze.h"
6 #include "analyze-log-control.h"
7 #include "bus-util.h"
8 #include "runtime-scope.h"
9 #include "verb-log-control.h"
10
11 int verb_log_control(int argc, char *argv[], uintptr_t _data, void *userdata) {
12 _cleanup_(sd_bus_flush_close_unrefp) sd_bus *bus = NULL;
13 int r;
14
15 assert(IN_SET(argc, 1, 2));
16
17 r = acquire_bus(&bus, NULL);
18 if (r < 0)
19 return bus_log_connect_error(r, arg_transport, arg_runtime_scope);
20
21 r = verb_log_control_common(bus, "org.freedesktop.systemd1", argv[0], argc == 2 ? argv[1] : NULL);
22 if (r < 0)
23 return r;
24
25 return 0;
26 }