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:
@@ -11,6 +11,7 @@
|
||||
|
||||
#include "errno-util.h"
|
||||
#include "macro.h"
|
||||
#include "runtime-scope.h"
|
||||
#include "string-util.h"
|
||||
#include "time-util.h"
|
||||
|
||||
@@ -36,8 +37,8 @@ int bus_check_peercred(sd_bus *c);
|
||||
int bus_connect_system_systemd(sd_bus **ret_bus);
|
||||
int bus_connect_user_systemd(sd_bus **ret_bus);
|
||||
|
||||
int bus_connect_transport(BusTransport transport, const char *host, bool user, sd_bus **bus);
|
||||
int bus_connect_transport_systemd(BusTransport transport, const char *host, bool user, sd_bus **bus);
|
||||
int bus_connect_transport(BusTransport transport, const char *host, RuntimeScope runtime_scope, sd_bus **bus);
|
||||
int bus_connect_transport_systemd(BusTransport transport, const char *host, RuntimeScope runtime_scope, sd_bus **bus);
|
||||
|
||||
int bus_log_address_error(int r, BusTransport transport);
|
||||
int bus_log_connect_error(int r, BusTransport transport);
|
||||
|
||||
Reference in New Issue
Block a user