summaryrefslogtreecommitdiff
path: root/src/libsystemd-bus/bus-kernel.c
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2013-05-19 18:39:08 +0200
committerLennart Poettering <lennart@poettering.net>2013-05-20 10:13:38 +0200
commitc78196699d3d805b2237896a1d2b8efeec6068d0 (patch)
tree91a473710b96a395b4c7543d85c08e73bad13cab /src/libsystemd-bus/bus-kernel.c
parent12f25b6e741bc8394f63778598fc203e3f6d4ae6 (diff)
bus: calculate bloom filter for match
Yay! Filtering using kernel bloom filter matches works now! Yippieh!
Diffstat (limited to 'src/libsystemd-bus/bus-kernel.c')
-rw-r--r--src/libsystemd-bus/bus-kernel.c15
1 files changed, 2 insertions, 13 deletions
diff --git a/src/libsystemd-bus/bus-kernel.c b/src/libsystemd-bus/bus-kernel.c
index 50b28e7281..33c25a4fd9 100644
--- a/src/libsystemd-bus/bus-kernel.c
+++ b/src/libsystemd-bus/bus-kernel.c
@@ -34,18 +34,7 @@
#include "bus-kernel.h"
#include "bus-bloom.h"
-#define KDBUS_ITEM_NEXT(item) \
- (typeof(item))(((uint8_t *)item) + ALIGN8((item)->size))
-
-#define KDBUS_ITEM_FOREACH(item, head) \
- for (item = (head)->items; \
- (uint8_t *)(item) < (uint8_t *)(head) + (head)->size; \
- item = KDBUS_ITEM_NEXT(item))
-
-#define KDBUS_ITEM_HEADER_SIZE offsetof(struct kdbus_item, data)
-#define KDBUS_ITEM_SIZE(s) ALIGN8((s) + KDBUS_ITEM_HEADER_SIZE)
-
-static int parse_unique_name(const char *s, uint64_t *id) {
+int bus_kernel_parse_unique_name(const char *s, uint64_t *id) {
int r;
assert(s);
@@ -215,7 +204,7 @@ static int bus_message_setup_kmsg(sd_bus *b, sd_bus_message *m) {
return 0;
if (m->destination) {
- r = parse_unique_name(m->destination, &unique);
+ r = bus_kernel_parse_unique_name(m->destination, &unique);
if (r < 0)
return r;