summaryrefslogtreecommitdiff
path: root/src/machine
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2023-03-10 09:47:10 +0100
committerLennart Poettering <lennart@poettering.net>2023-03-10 09:47:39 +0100
commit4870133bfaaf97189a970a29bf47e0e38fa721aa (patch)
treed2fa9a5699a8b4c948179afabf3da2f9da322ce5 /src/machine
parent5f64d2bf332371bdfdcb91b588e57d4c0c20428f (diff)
downloadsystemd-4870133bfaaf97189a970a29bf47e0e38fa721aa.tar.gz
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/machine')
-rw-r--r--src/machine/machine-dbus.c2
-rw-r--r--src/machine/machinectl.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/src/machine/machine-dbus.c b/src/machine/machine-dbus.c
index 45bc056326..111158cb76 100644
--- a/src/machine/machine-dbus.c
+++ b/src/machine/machine-dbus.c
@@ -502,7 +502,7 @@ static int container_bus_new(Machine *m, sd_bus_error *error, sd_bus **ret) {
bus->address = address;
bus->bus_client = true;
bus->trusted = false;
- bus->is_system = true;
+ bus->runtime_scope = RUNTIME_SCOPE_SYSTEM;
r = sd_bus_start(bus);
if (r == -ENOENT)
diff --git a/src/machine/machinectl.c b/src/machine/machinectl.c
index 80eebf36d3..e9956466ce 100644
--- a/src/machine/machinectl.c
+++ b/src/machine/machinectl.c
@@ -2842,7 +2842,7 @@ static int run(int argc, char *argv[]) {
if (r <= 0)
return r;
- r = bus_connect_transport(arg_transport, arg_host, false, &bus);
+ r = bus_connect_transport(arg_transport, arg_host, RUNTIME_SCOPE_SYSTEM, &bus);
if (r < 0)
return bus_log_connect_error(r, arg_transport);