summaryrefslogtreecommitdiff
path: root/src/core/unit.h
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2012-04-29 14:26:07 +0200
committerLennart Poettering <lennart@poettering.net>2012-04-30 10:52:07 +0200
commit7c8fa05c4d5d01748ff2a04edb882afb3119b7d7 (patch)
treea3dc4d052ac25915fa0b23bf695891d5989aff7e /src/core/unit.h
parenta8ad0f89286b878cbe1f330f72abd2d22813f8ea (diff)
unit: add new dependency type RequiresMountsFor=
RequiresMountsFor= is a shortcut for adding requires and after dependencies to all mount units neeed for the specified paths. This solves a couple of issues regarding dep loop cycles for encrypted swap.
Diffstat (limited to 'src/core/unit.h')
-rw-r--r--src/core/unit.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/core/unit.h b/src/core/unit.h
index c2bae0a45c..33920892fd 100644
--- a/src/core/unit.h
+++ b/src/core/unit.h
@@ -153,6 +153,8 @@ struct Unit {
Set *names;
Set *dependencies[_UNIT_DEPENDENCY_MAX];
+ char **requires_mounts_for;
+
char *description;
char *fragment_path; /* if loaded from a config file this is the primary path to it */
@@ -186,6 +188,9 @@ struct Unit {
/* Per type list */
LIST_FIELDS(Unit, units_by_type);
+ /* All units which have requires_mounts_for set */
+ LIST_FIELDS(Unit, has_requires_mounts_for);
+
/* Load queue */
LIST_FIELDS(Unit, load_queue);
@@ -554,6 +559,9 @@ void unit_ref_unset(UnitRef *ref);
#define UNIT_DEREF(ref) ((ref).unit)
+int unit_add_one_mount_link(Unit *u, Mount *m);
+int unit_add_mount_links(Unit *u);
+
const char *unit_load_state_to_string(UnitLoadState i);
UnitLoadState unit_load_state_from_string(const char *s);