summaryrefslogtreecommitdiff
path: root/src/libsystemd-bus/bus-kernel.h
diff options
context:
space:
mode:
authorDaniel Mack <zonque@gmail.com>2013-11-15 15:55:27 +0100
committerDaniel Mack <zonque@gmail.com>2013-11-29 14:06:49 +0100
commit9eb34e82257599399c3defa443d9b3d6aed8c57f (patch)
treea38a5b0b5f9be461dbffc3b09bf5969e9651ded4 /src/libsystemd-bus/bus-kernel.h
parent5461f53f186d4253c690df8d1ae06710e0d17585 (diff)
libsystemd-bus: bring definitions in sync with kdbus
In particular, KDBUS_ITEM_NEXT is now called KDBUS_PART_NEXT, and KDBUS_ITEM_FOREACH was renamed to KDBUS_PART_FOREACH and takes one more argument to make it more flexible.
Diffstat (limited to 'src/libsystemd-bus/bus-kernel.h')
-rw-r--r--src/libsystemd-bus/bus-kernel.h14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/libsystemd-bus/bus-kernel.h b/src/libsystemd-bus/bus-kernel.h
index c4573c9222..69df4f4e9e 100644
--- a/src/libsystemd-bus/bus-kernel.h
+++ b/src/libsystemd-bus/bus-kernel.h
@@ -23,16 +23,16 @@
#include "sd-bus.h"
-#define KDBUS_ITEM_NEXT(item) \
+#define KDBUS_PART_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_PART_FOREACH(part, head, first) \
+ for (part = (head)->first; \
+ (uint8_t *)(part) < (uint8_t *)(head) + (head)->size; \
+ part = KDBUS_PART_NEXT(part))
-#define KDBUS_ITEM_HEADER_SIZE offsetof(struct kdbus_item, data)
-#define KDBUS_ITEM_SIZE(s) ALIGN8((s) + KDBUS_ITEM_HEADER_SIZE)
+#define KDBUS_PART_HEADER_SIZE offsetof(struct kdbus_item, data)
+#define KDBUS_ITEM_SIZE(s) ALIGN8((s) + KDBUS_PART_HEADER_SIZE)
#define MEMFD_CACHE_MAX 32