assert(a);
- LIST_FOREACH(units_per_type, other, a->meta.manager->units_per_type[UNIT_MOUNT])
+ LIST_FOREACH(units_by_type, other, a->meta.manager->units_by_type[UNIT_MOUNT])
if ((r = automount_add_one_mount_link(a, (Mount*) other)) < 0)
return r;
/* To make it easy to iterate through the units of a specific
* type we maintain a per type linked list */
- LIST_HEAD(Meta, units_per_type[_UNIT_TYPE_MAX]);
+ LIST_HEAD(Meta, units_by_type[_UNIT_TYPE_MAX]);
/* Units that need to be loaded */
LIST_HEAD(Meta, load_queue); /* this is actually more a stack than a queue, but uh. */
m->where = NULL;
/* Try to detach us from the automount unit if there is any */
- LIST_FOREACH(units_per_type, other, m->meta.manager->units_per_type[UNIT_AUTOMOUNT]) {
+ LIST_FOREACH(units_by_type, other, m->meta.manager->units_by_type[UNIT_AUTOMOUNT]) {
Automount *a = (Automount*) other;
if (a->mount == m)
/* Adds in links to other mount points that might lie below or
* above us in the hierarchy */
- LIST_FOREACH(units_per_type, other, m->meta.manager->units_per_type[UNIT_MOUNT]) {
+ LIST_FOREACH(units_by_type, other, m->meta.manager->units_by_type[UNIT_MOUNT]) {
Mount *n = (Mount*) other;
MountParameters *pn;
assert(m);
- LIST_FOREACH(units_per_type, other, m->meta.manager->units_per_type[UNIT_SWAP])
+ LIST_FOREACH(units_by_type, other, m->meta.manager->units_by_type[UNIT_SWAP])
if ((r = swap_add_one_mount_link((Swap*) other, m)) < 0)
return r;
assert(m);
- LIST_FOREACH(units_per_type, other, m->meta.manager->units_per_type[UNIT_PATH])
+ LIST_FOREACH(units_by_type, other, m->meta.manager->units_by_type[UNIT_PATH])
if ((r = path_add_one_mount_link((Path*) other, m)) < 0)
return r;
assert(m);
- LIST_FOREACH(units_per_type, other, m->meta.manager->units_per_type[UNIT_AUTOMOUNT])
+ LIST_FOREACH(units_by_type, other, m->meta.manager->units_by_type[UNIT_AUTOMOUNT])
if ((r = automount_add_one_mount_link((Automount*) other, m)) < 0)
return r;
assert(m);
- LIST_FOREACH(units_per_type, other, m->meta.manager->units_per_type[UNIT_SOCKET])
+ LIST_FOREACH(units_by_type, other, m->meta.manager->units_by_type[UNIT_SOCKET])
if ((r = socket_add_one_mount_link((Socket*) other, m)) < 0)
return r;
log_error("Failed to reread /proc/self/mountinfo: %s", strerror(-r));
/* Reset flags, just in case, for later calls */
- LIST_FOREACH(units_per_type, meta, m->units_per_type[UNIT_MOUNT]) {
+ LIST_FOREACH(units_by_type, meta, m->units_by_type[UNIT_MOUNT]) {
Mount *mount = (Mount*) meta;
mount->is_mounted = mount->just_mounted = mount->just_changed = false;
manager_dispatch_load_queue(m);
- LIST_FOREACH(units_per_type, meta, m->units_per_type[UNIT_MOUNT]) {
+ LIST_FOREACH(units_by_type, meta, m->units_by_type[UNIT_MOUNT]) {
Mount *mount = (Mount*) meta;
if (!mount->is_mounted) {
assert(p);
- LIST_FOREACH(units_per_type, other, p->meta.manager->units_per_type[UNIT_MOUNT])
+ LIST_FOREACH(units_by_type, other, p->meta.manager->units_by_type[UNIT_MOUNT])
if ((r = path_add_one_mount_link(p, (Mount*) other)) < 0)
return r;
/* For each pair of services where at least one lacks a LSB
* header, we use the start priority value to order things. */
- LIST_FOREACH(units_per_type, other, s->meta.manager->units_per_type[UNIT_SERVICE]) {
+ LIST_FOREACH(units_by_type, other, s->meta.manager->units_by_type[UNIT_SERVICE]) {
Service *t;
UnitDependency d;
bool special_s, special_t;
/* For each pair of services where both have an fsck priority
* we order things based on it. */
- LIST_FOREACH(units_per_type, other, s->meta.manager->units_per_type[UNIT_SERVICE]) {
+ LIST_FOREACH(units_by_type, other, s->meta.manager->units_by_type[UNIT_SERVICE]) {
Service *t;
UnitDependency d;
unit_unwatch_timer(u, &s->timer_watch);
/* Make sure no service instance refers to us anymore. */
- LIST_FOREACH(units_per_type, i, u->meta.manager->units_per_type[UNIT_SERVICE]) {
+ LIST_FOREACH(units_by_type, i, u->meta.manager->units_by_type[UNIT_SERVICE]) {
Service *service = (Service *) i;
if (service->accept_socket == s)
assert(s);
- LIST_FOREACH(units_per_type, other, s->meta.manager->units_per_type[UNIT_MOUNT])
+ LIST_FOREACH(units_by_type, other, s->meta.manager->units_by_type[UNIT_MOUNT])
if ((r = socket_add_one_mount_link(s, (Mount*) other)) < 0)
return r;
/* If there's already a start pending don't bother to
* do anything */
- LIST_FOREACH(units_per_type, i, s->meta.manager->units_per_type[UNIT_SERVICE]) {
+ LIST_FOREACH(units_by_type, i, s->meta.manager->units_by_type[UNIT_SERVICE]) {
Service *service = (Service *) i;
if (!set_get(service->configured_sockets, s))
assert(s);
- LIST_FOREACH(units_per_type, other, s->meta.manager->units_per_type[UNIT_MOUNT])
+ LIST_FOREACH(units_by_type, other, s->meta.manager->units_by_type[UNIT_MOUNT])
if ((r = swap_add_one_mount_link(s, (Mount*) other)) < 0)
return r;
log_error("Failed to reread /proc/swaps: %s", strerror(-r));
/* Reset flags, just in case, for late calls */
- LIST_FOREACH(units_per_type, meta, m->units_per_type[UNIT_SWAP]) {
+ LIST_FOREACH(units_by_type, meta, m->units_by_type[UNIT_SWAP]) {
Swap *swap = (Swap*) meta;
swap->is_active = swap->just_activated = false;
manager_dispatch_load_queue(m);
- LIST_FOREACH(units_per_type, meta, m->units_per_type[UNIT_SWAP]) {
+ LIST_FOREACH(units_by_type, meta, m->units_by_type[UNIT_SWAP]) {
Swap *swap = (Swap*) meta;
if (!swap->is_active) {
u->meta.id = s;
u->meta.instance = i;
- LIST_PREPEND(Meta, units_per_type, u->meta.manager->units_per_type[t], &u->meta);
+ LIST_PREPEND(Meta, units_by_type, u->meta.manager->units_by_type[t], &u->meta);
if (UNIT_VTABLE(u)->init)
UNIT_VTABLE(u)->init(u);
bidi_set_free(u, u->meta.dependencies[d]);
if (u->meta.type != _UNIT_TYPE_INVALID)
- LIST_REMOVE(Meta, units_per_type, u->meta.manager->units_per_type[u->meta.type], &u->meta);
+ LIST_REMOVE(Meta, units_by_type, u->meta.manager->units_by_type[u->meta.type], &u->meta);
if (u->meta.in_load_queue)
LIST_REMOVE(Meta, load_queue, u->meta.manager->load_queue, &u->meta);
CGroupBonding *cgroup_bondings;
/* Per type list */
- LIST_FIELDS(Meta, units_per_type);
+ LIST_FIELDS(Meta, units_by_type);
/* Load queue */
LIST_FIELDS(Meta, load_queue);