return 0;
}
+int unit_choose_id(Unit *u, const char *name) {
+ char *s;
+
+ assert(u);
+ assert(name);
+
+ /* Selects one of the names of this unit as the id */
+
+ if (!(s = set_get(u->meta.names, (char*) name)))
+ return -ENOENT;
+
+ u->meta.id = s;
+ return 0;
+}
+
void unit_add_to_load_queue(Unit *u) {
assert(u);
int unit_add_dependency(Unit *u, UnitDependency d, Unit *other);
int unit_add_dependency_by_name(Unit *u, UnitDependency d, const char *name);
+int unit_choose_id(Unit *u, const char *name);
+
void unit_add_to_load_queue(Unit *u);
int unit_merge(Unit *u, Unit *other);