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.
This commit is contained in:
@@ -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)
|
||||
|
||||
@@ -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);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user