mirror of
https://github.com/systemd/systemd.git
synced 2025-02-14 05:57:40 +03:00
device: properly create dependencies
This commit is contained in:
parent
7c9c5d0eb1
commit
ee5f3479e2
@ -252,7 +252,7 @@ static int device_process_new_device(Manager *m, struct udev_device *dev, bool u
|
||||
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);
|
||||
|
||||
if (r < 0)
|
||||
@ -270,8 +270,12 @@ static int device_process_new_device(Manager *m, struct udev_device *dev, bool u
|
||||
return 0;
|
||||
|
||||
fail:
|
||||
|
||||
log_warning("Failed to load device unit: %s", strerror(-r));
|
||||
|
||||
if (delete && u)
|
||||
unit_free(u);
|
||||
|
||||
return r;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user