]> git.ipfire.org Git - thirdparty/systemd.git/blobdiff - src/core/device.c
test: add test for DynamicUser= + StateDirectory=
[thirdparty/systemd.git] / src / core / device.c
index 5366ba050ffc7d6e6da54d4955092c144b7729cf..87186f135bf817f15fcd5205980a94f49aa08dd9 100644 (file)
@@ -766,27 +766,7 @@ static int device_dispatch_io(sd_event_source *source, int fd, uint32_t revents,
                 return 0;
         }
 
-        if (streq(action, "change"))  {
-                _cleanup_free_ char *e = NULL;
-                Unit *u;
-
-                r = unit_name_from_path(sysfs, ".device", &e);
-                if (r < 0)
-                        return log_error_errno(r, "Failed to generate unit name from device path: %m");
-
-                u = manager_get_unit(m, e);
-                if (!u) {
-                        log_error("Failed to get unit from sysfs name.");
-                        return 0;
-                }
-
-                r = manager_add_job(m, JOB_RELOAD, u, JOB_REPLACE, NULL, NULL);
-                if (r < 0) {
-                        log_error_errno(r, "Failed to add job to manager : %m");
-                        return 0;
-                }
-
-        } else if (streq(action, "remove"))  {
+        if (streq(action, "remove"))  {
                 r = swap_process_device_remove(m, dev);
                 if (r < 0)
                         log_error_errno(r, "Failed to process swap device remove event: %m");