diff options
author | Lennart Poettering <lennart@poettering.net> | 2010-01-29 06:04:08 +0100 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2010-01-29 06:04:08 +0100 |
commit | ef734fd6c2ec4e5602bbfe2a0d26dcf39c14d2bf (patch) | |
tree | 4fb6422913f35cd3fb925aaaae0b56c78c30e075 /unit.c | |
parent | 38a4d4f089df02ff79b5f560f2b11631e0a6a4f9 (diff) |
watch mount status file
Diffstat (limited to 'unit.c')
-rw-r--r-- | unit.c | 6 |
1 files changed, 6 insertions, 0 deletions
@@ -147,6 +147,9 @@ int unit_add_name(Unit *u, const char *text) { return r; } + if (u->meta.type == _UNIT_TYPE_INVALID) + LIST_PREPEND(Meta, units_per_type, u->meta.manager->units_per_type[t], &u->meta); + u->meta.type = t; if (!u->meta.id) @@ -224,6 +227,9 @@ void unit_free(Unit *u) { SET_FOREACH(t, u->meta.names, i) hashmap_remove_value(u->meta.manager->units, t, u); + if (u->meta.type != _UNIT_TYPE_INVALID) + LIST_REMOVE(Meta, units_per_type, u->meta.manager->units_per_type[u->meta.type], &u->meta); + if (u->meta.in_load_queue) LIST_REMOVE(Meta, load_queue, u->meta.manager->load_queue, &u->meta); |