diff options
author | Daniel Mack <zonque@gmail.com> | 2014-08-18 22:07:47 +0200 |
---|---|---|
committer | Daniel Mack <daniel@zonque.org> | 2014-09-08 11:06:45 +0200 |
commit | 5369c77d2ee864ac0464d4adc0774ee70ba9c4bc (patch) | |
tree | 0206b657a3fbf3db03e3750155d4a120f31c68c7 /src/libsystemd/sd-bus | |
parent | de68938a2cb3ab535ebd9198723a651753c1a1df (diff) |
bus: factor out bus policy items
In order to re-use the policy definitions, factor them out into their own
files.
Diffstat (limited to 'src/libsystemd/sd-bus')
-rw-r--r-- | src/libsystemd/sd-bus/bus-kernel.c | 12 | ||||
-rw-r--r-- | src/libsystemd/sd-bus/bus-kernel.h | 2 |
2 files changed, 7 insertions, 7 deletions
diff --git a/src/libsystemd/sd-bus/bus-kernel.c b/src/libsystemd/sd-bus/bus-kernel.c index 03c4165095..ca0eddb38d 100644 --- a/src/libsystemd/sd-bus/bus-kernel.c +++ b/src/libsystemd/sd-bus/bus-kernel.c @@ -1322,19 +1322,19 @@ int bus_kernel_create_bus(const char *name, bool world, char **s) { return fd; } -static int bus_kernel_translate_access(BusNamePolicyAccess access) { +static int bus_kernel_translate_access(BusPolicyAccess access) { assert(access >= 0); - assert(access < _BUSNAME_POLICY_ACCESS_MAX); + assert(access < _BUS_POLICY_ACCESS_MAX); switch (access) { - case BUSNAME_POLICY_ACCESS_SEE: + case BUS_POLICY_ACCESS_SEE: return KDBUS_POLICY_SEE; - case BUSNAME_POLICY_ACCESS_TALK: + case BUS_POLICY_ACCESS_TALK: return KDBUS_POLICY_TALK; - case BUSNAME_POLICY_ACCESS_OWN: + case BUS_POLICY_ACCESS_OWN: return KDBUS_POLICY_OWN; default: @@ -1414,7 +1414,7 @@ int bus_kernel_make_starter( bool activating, bool accept_fd, BusNamePolicy *policy, - BusNamePolicyAccess world_policy) { + BusPolicyAccess world_policy) { struct kdbus_cmd_hello *hello; struct kdbus_item *n; diff --git a/src/libsystemd/sd-bus/bus-kernel.h b/src/libsystemd/sd-bus/bus-kernel.h index 448dd3a797..182f953d47 100644 --- a/src/libsystemd/sd-bus/bus-kernel.h +++ b/src/libsystemd/sd-bus/bus-kernel.h @@ -66,7 +66,7 @@ int bus_kernel_write_message(sd_bus *bus, sd_bus_message *m, bool hint_sync_call int bus_kernel_read_message(sd_bus *bus, bool hint_priority, int64_t priority); int bus_kernel_open_bus_fd(const char *bus, char **path); -int bus_kernel_make_starter(int fd, const char *name, bool activating, bool accept_fd, BusNamePolicy *policy, BusNamePolicyAccess world_policy); +int bus_kernel_make_starter(int fd, const char *name, bool activating, bool accept_fd, BusNamePolicy *policy, BusPolicyAccess world_policy); int bus_kernel_create_bus(const char *name, bool world, char **s); int bus_kernel_create_domain(const char *name, char **s); |