diff options
author | Lennart Poettering <lennart@poettering.net> | 2010-11-15 18:26:37 +0100 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2010-11-15 18:26:37 +0100 |
commit | 8c4dd542afde23d21d736b24b5ab66c25ab091e8 (patch) | |
tree | 58e4044628e981d364a0fa940fd6055dd217a7ea /src | |
parent | 99f08d14a7e4210bdb97b8c9d0752ec318ecca30 (diff) |
units: get rid of no_requires unit flag, and make crypto disks require cryptsetup service
Diffstat (limited to 'src')
-rw-r--r-- | src/cryptsetup-generator.c | 2 | ||||
-rw-r--r-- | src/device.c | 1 | ||||
-rw-r--r-- | src/unit.c | 9 | ||||
-rw-r--r-- | src/unit.h | 5 |
4 files changed, 1 insertions, 16 deletions
diff --git a/src/cryptsetup-generator.c b/src/cryptsetup-generator.c index b8db0d5e1c..a2b398dd15 100644 --- a/src/cryptsetup-generator.c +++ b/src/cryptsetup-generator.c @@ -163,7 +163,7 @@ static int create_disk( to = NULL; e = unit_name_escape(name); - if (asprintf(&to, "%s/dev-mapper-%s.device.wants/%s", arg_dest, e, n) < 0) { + if (asprintf(&to, "%s/dev-mapper-%s.device.requires/%s", arg_dest, e, n) < 0) { r = -ENOMEM; goto fail; } diff --git a/src/device.c b/src/device.c index 7cb4ff699e..5c18d996ea 100644 --- a/src/device.c +++ b/src/device.c @@ -562,7 +562,6 @@ DEFINE_STRING_TABLE_LOOKUP(device_state, DeviceState); const UnitVTable device_vtable = { .suffix = ".device", - .no_requires = true, .no_instances = true, .no_snapshots = true, .no_isolate = true, diff --git a/src/unit.c b/src/unit.c index b3a8210a57..edc636412d 100644 --- a/src/unit.c +++ b/src/unit.c @@ -1456,15 +1456,6 @@ int unit_add_dependency(Unit *u, UnitDependency d, Unit *other, bool add_referen if (u == other) return 0; - if (UNIT_VTABLE(u)->no_requires && - (d == UNIT_REQUIRES || - d == UNIT_REQUIRES_OVERRIDABLE || - d == UNIT_REQUISITE || - d == UNIT_REQUISITE_OVERRIDABLE || - d == UNIT_BIND_TO)) { - return -EINVAL; - } - if ((r = set_ensure_allocated(&u->meta.dependencies[d], trivial_hash_func, trivial_compare_func)) < 0) return r; diff --git a/src/unit.h b/src/unit.h index b260dd5b98..fbe88c2c79 100644 --- a/src/unit.h +++ b/src/unit.h @@ -353,11 +353,6 @@ struct UnitVTable { /* Can units of this type have multiple names? */ bool no_alias:1; - /* If true units of this types can never have "Requires" - * dependencies, because state changes can only be observed, - * not triggered */ - bool no_requires:1; - /* Instances make no sense for this type */ bool no_instances:1; |