summaryrefslogtreecommitdiff
path: root/src/libsystemd/sd-bus/bus-kernel.h
diff options
context:
space:
mode:
authorDavid Herrmann <dh.herrmann@gmail.com>2015-02-04 16:21:27 +0100
committerDavid Herrmann <dh.herrmann@gmail.com>2015-02-05 16:52:42 +0100
commitb2086f601b313939db160aa028e66649ba81bd01 (patch)
treeabe651754fd54848fafae97e63856cd05eb829c3 /src/libsystemd/sd-bus/bus-kernel.h
parenta97dcc12e486ecff531809802930a26c4da827f2 (diff)
bus: sync with kdbus (ABI break)
Diffstat (limited to 'src/libsystemd/sd-bus/bus-kernel.h')
-rw-r--r--src/libsystemd/sd-bus/bus-kernel.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/libsystemd/sd-bus/bus-kernel.h b/src/libsystemd/sd-bus/bus-kernel.h
index 7b1e9ef981..b9f31ba790 100644
--- a/src/libsystemd/sd-bus/bus-kernel.h
+++ b/src/libsystemd/sd-bus/bus-kernel.h
@@ -33,6 +33,11 @@
((uint8_t *)(part) < (uint8_t *)(head) + (head)->size) && \
((uint8_t *) part >= (uint8_t *) head); \
part = KDBUS_ITEM_NEXT(part))
+#define KDBUS_FOREACH(iter, first, _size) \
+ for (iter = (first); \
+ ((uint8_t *)(iter) < (uint8_t *)(first) + (_size)) && \
+ ((uint8_t *)(iter) >= (uint8_t *)(first)); \
+ iter = (void*)(((uint8_t *)iter) + ALIGN8((iter)->size)))
#define KDBUS_ITEM_HEADER_SIZE offsetof(struct kdbus_item, data)
#define KDBUS_ITEM_SIZE(s) ALIGN8((s) + KDBUS_ITEM_HEADER_SIZE)