goto fail;
if (wants) {
- FOREACH_WORD(w, l, wants, state) {
+ FOREACH_WORD_QUOTED(w, l, wants, state) {
char *e;
if (!(e = strndup(w, l))) {
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)
return 0;
fail:
+
+ log_warning("Failed to load device unit: %s", strerror(-r));
+
if (delete && u)
unit_free(u);
+
return r;
}