Blob Blame History Raw
From 5d976fa2fa07dbf77bef23f1789e6d7389d4acea Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= <zbyszek@in.waw.pl>
Date: Tue, 14 Jan 2014 17:31:00 -0500
Subject: [PATCH] Revert "systemd: add a start job for all units specified with
 SYSTEMD_WANTS="

This reverts commit 043a559ff3732439fc61872a6320ee0a05dd088f.

This was a mistake, and was reverted upstream.
---
 src/core/device.c | 14 +++-----------
 1 file changed, 3 insertions(+), 11 deletions(-)

diff --git a/src/core/device.c b/src/core/device.c
index e02c207..f79c206 100644
--- a/src/core/device.c
+++ b/src/core/device.c
@@ -282,8 +282,7 @@ static int device_update_unit(Manager *m, struct udev_device *dev, const char *p
                         size_t l;
 
                         FOREACH_WORD_QUOTED(w, l, wants, state) {
-                                _cleanup_free_ char *e, *n = NULL;
-                                Unit *other;
+                                char *e, *n;
 
                                 e = strndup(w, l);
                                 if (!e) {
@@ -295,19 +294,12 @@ static int device_update_unit(Manager *m, struct udev_device *dev, const char *p
                                         r = -ENOMEM;
                                         goto fail;
                                 }
+                                free(e);
 
                                 r = unit_add_dependency_by_name(u, UNIT_WANTS, n, NULL, true);
+                                free(n);
                                 if (r < 0)
                                         goto fail;
-
-                                other = manager_get_unit(u->manager, n);
-                                if (!other || !unit_can_start(other))
-                                        continue;
-
-                                r = manager_add_job(u->manager, JOB_START, other, JOB_REPLACE, true, NULL, NULL);
-                                if (r < 0)
-                                        log_warning("Failed to add job %s/%s, ignoring: %s.",
-                                                    other->id, job_type_to_string(JOB_START), strerror(-r));
                         }
                 }
         }