summaryrefslogtreecommitdiff
path: root/src/list.h
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2010-10-12 04:07:43 +0200
committerLennart Poettering <lennart@poettering.net>2010-10-12 04:08:04 +0200
commite04aad61bb5eff117e51631727a3ef2807c75d6b (patch)
treeba81670a61b706bd9194eb289f9dbd3ba4107dfb /src/list.h
parent60b912f6b1c6bce67ec4a979594981f6a3b13987 (diff)
swap: major rework, use /sbin/swapon for setting up swaps, fix merging of aliased swap disks
Diffstat (limited to 'src/list.h')
-rw-r--r--src/list.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/list.h b/src/list.h
index e49d953d0a..3cf18f1547 100644
--- a/src/list.h
+++ b/src/list.h
@@ -116,4 +116,10 @@
#define LIST_FOREACH_SAFE(name,i,n,head) \
for ((i) = (head); (i) && (((n) = (i)->name##_next), 1); (i) = (n))
+#define LIST_FOREACH_BEFORE(name,i,p) \
+ for ((i) = (p)->name##_prev; (i); (i) = (i)->name##_prev)
+
+#define LIST_FOREACH_AFTER(name,i,p) \
+ for ((i) = (p)->name##_next; (i); (i) = (i)->name##_next)
+
#endif