]> err.no Git - systemd/commitdiff
units: get rid of no_requires unit flag, and make crypto disks require cryptsetup...
authorLennart Poettering <lennart@poettering.net>
Mon, 15 Nov 2010 17:26:37 +0000 (18:26 +0100)
committerLennart Poettering <lennart@poettering.net>
Mon, 15 Nov 2010 17:26:37 +0000 (18:26 +0100)
src/cryptsetup-generator.c
src/device.c
src/unit.c
src/unit.h

index b8db0d5e1c5aa2ad42ad4caf959f0c7fc46ef095..a2b398dd156f31fa99751c89c78c546a96e06303 100644 (file)
@@ -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;
         }
index 7cb4ff699e51a9c723f5a1d7907df1a79ed36c20..5c18d996eaf76f53630a6c6f8ba9d19be62114a0 100644 (file)
@@ -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,
index b3a8210a577ac897af818982ce11a7fd6df66fb1..edc636412d98f682b62a6ca973c35783f347fd8b 100644 (file)
@@ -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;
 
index b260dd5b986b35edd10e1079ce8910c785453d41..fbe88c2c794e4a58d8fea0df591fc931365245a3 100644 (file)
@@ -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;