diff options
author | Daniel Mack <daniel@zonque.org> | 2014-10-08 15:32:41 +0200 |
---|---|---|
committer | Daniel Mack <daniel@zonque.org> | 2014-10-08 17:30:49 +0200 |
commit | 40885bb29e3f39fc06787075f666a0ec2ac35361 (patch) | |
tree | 595ca66a2d2e47bc8cf2e3a24a54f84228c65a72 /src/libsystemd/sd-bus/bus-kernel.c | |
parent | 85614d663e4a09beee1c78aaa67f02943d50d5a0 (diff) |
sd-bus: sync kdbus.h (ABI break)
Sync kdbus.h once again. Two thing have changed:
a) KDBUS_CMD_EP_* was renamed to KDBUS_CMD_ENDPOINT_*
b) struct kdbus_cmd_hello and struct kdbus_cmd_make gained a
'features' bitfield (which is currently unused)
Diffstat (limited to 'src/libsystemd/sd-bus/bus-kernel.c')
-rw-r--r-- | src/libsystemd/sd-bus/bus-kernel.c | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/src/libsystemd/sd-bus/bus-kernel.c b/src/libsystemd/sd-bus/bus-kernel.c index b431d78139..c3dbc837d7 100644 --- a/src/libsystemd/sd-bus/bus-kernel.c +++ b/src/libsystemd/sd-bus/bus-kernel.c @@ -1307,9 +1307,9 @@ int bus_kernel_create_bus(const char *name, bool world, char **s) { return -errno; } - /* The higher 32bit of the flags field are considered - * 'incompatible flags'. Refuse them all for now. */ - if (make->flags > 0xFFFFFFFFULL) { + /* The features field are considered 'incompatible flags'. + * Refuse them all for now. */ + if (make->features) { safe_close(fd); return -ENOTSUP; } @@ -1439,14 +1439,14 @@ int bus_kernel_create_endpoint(const char *bus_name, const char *ep_name, char * n->size = offsetof(struct kdbus_item, str) + strlen(ep_name) + 1; strcpy(n->str, ep_name); - if (ioctl(fd, KDBUS_CMD_EP_MAKE, make) < 0) { + if (ioctl(fd, KDBUS_CMD_ENDPOINT_MAKE, make) < 0) { safe_close(fd); return -errno; } - /* The higher 32bit of the flags field are considered - * 'incompatible flags'. Refuse them all for now. */ - if (make->flags > 0xFFFFFFFFULL) { + /* The features field are considered 'incompatible flags'. + * Refuse them all for now. */ + if (make->features) { safe_close(fd); return -ENOTSUP; } @@ -1503,7 +1503,7 @@ int bus_kernel_set_endpoint_policy(int fd, uid_t uid, BusEndpoint *ep) { n = KDBUS_ITEM_NEXT(n); } - r = ioctl(fd, KDBUS_CMD_EP_UPDATE, update); + r = ioctl(fd, KDBUS_CMD_ENDPOINT_UPDATE, update); if (r < 0) return -errno; @@ -1576,7 +1576,8 @@ int bus_kernel_make_starter( /* The higher 32bit of both flags fields are considered * 'incompatible flags'. Refuse them all for now. */ - if (hello->bus_flags > 0xFFFFFFFFULL || + if (hello->features || + hello->bus_flags > 0xFFFFFFFFULL || hello->conn_flags > 0xFFFFFFFFULL) return -ENOTSUP; |