diff options
author | Lennart Poettering <lennart@poettering.net> | 2023-03-10 09:47:10 +0100 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2023-03-10 09:47:39 +0100 |
commit | 4870133bfaaf97189a970a29bf47e0e38fa721aa (patch) | |
tree | d2fa9a5699a8b4c948179afabf3da2f9da322ce5 /src/cgls | |
parent | socket-util: fix socket_get_family() (diff) | |
download | systemd-4870133bfaaf97189a970a29bf47e0e38fa721aa.tar.xz systemd-4870133bfaaf97189a970a29bf47e0e38fa721aa.zip |
basic: add RuntimeScope enum
In various tools and services we have a per-system and per-user concept.
So far we sometimes used a boolean indicating whether we are in system
mode, or a reversed boolean indicating whether we are in user mode, or
the LookupScope enum used by the lookup path logic.
Let's address that, in introduce a common enum for this, we can use all
across the board.
This is mostly just search/replace, no actual code changes.
Diffstat (limited to 'src/cgls')
-rw-r--r-- | src/cgls/cgls.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/cgls/cgls.c b/src/cgls/cgls.c index a6ec6326f3..d6703634e1 100644 --- a/src/cgls/cgls.c +++ b/src/cgls/cgls.c @@ -215,9 +215,10 @@ static int run(int argc, char *argv[]) { if (!bus) { /* Connect to the bus only if necessary */ - r = bus_connect_transport_systemd(BUS_TRANSPORT_LOCAL, NULL, - arg_show_unit == SHOW_UNIT_USER, - &bus); + r = bus_connect_transport_systemd( + BUS_TRANSPORT_LOCAL, NULL, + arg_show_unit == SHOW_UNIT_USER ? RUNTIME_SCOPE_USER : RUNTIME_SCOPE_SYSTEM, + &bus); if (r < 0) return bus_log_connect_error(r, BUS_TRANSPORT_LOCAL); } |