Commit ee5f3479 authored by Lennart Poettering's avatar Lennart Poettering
Browse files

device: properly create dependencies

parent 7c9c5d0e
...@@ -252,7 +252,7 @@ static int device_process_new_device(Manager *m, struct udev_device *dev, bool u ...@@ -252,7 +252,7 @@ static int device_process_new_device(Manager *m, struct udev_device *dev, bool u
goto fail; goto fail;
} }
r = unit_add_dependency_by_name(u, UNIT_WANTS, NULL, e, true); r = unit_add_dependency_by_name(u, UNIT_WANTS, e, NULL, true);
free(e); free(e);
if (r < 0) if (r < 0)
...@@ -270,8 +270,12 @@ static int device_process_new_device(Manager *m, struct udev_device *dev, bool u ...@@ -270,8 +270,12 @@ static int device_process_new_device(Manager *m, struct udev_device *dev, bool u
return 0; return 0;
fail: fail:
log_warning("Failed to load device unit: %s", strerror(-r));
if (delete && u) if (delete && u)
unit_free(u); unit_free(u);
return r; return r;
} }
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment