mirror of
https://github.com/systemd/systemd.git
synced 2025-01-12 13:18:14 +03:00
english: s/_per_/_by_/
This commit is contained in:
parent
fb19a739d5
commit
ab5c3e3ff1
@ -142,7 +142,7 @@ static int automount_add_mount_links(Automount *a) {
|
||||
|
||||
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;
|
||||
|
||||
|
@ -102,7 +102,7 @@ struct Manager {
|
||||
|
||||
/* 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. */
|
||||
|
16
src/mount.c
16
src/mount.c
@ -114,7 +114,7 @@ static void mount_done(Unit *u) {
|
||||
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)
|
||||
@ -166,7 +166,7 @@ static int mount_add_mount_links(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;
|
||||
|
||||
@ -223,7 +223,7 @@ static int mount_add_swap_links(Mount *m) {
|
||||
|
||||
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;
|
||||
|
||||
@ -236,7 +236,7 @@ static int mount_add_path_links(Mount *m) {
|
||||
|
||||
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;
|
||||
|
||||
@ -249,7 +249,7 @@ static int mount_add_automount_links(Mount *m) {
|
||||
|
||||
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;
|
||||
|
||||
@ -262,7 +262,7 @@ static int mount_add_socket_links(Mount *m) {
|
||||
|
||||
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;
|
||||
|
||||
@ -1687,7 +1687,7 @@ void mount_fd_event(Manager *m, int events) {
|
||||
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;
|
||||
@ -1698,7 +1698,7 @@ void mount_fd_event(Manager *m, int events) {
|
||||
|
||||
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) {
|
||||
|
@ -102,7 +102,7 @@ static int path_add_mount_links(Path *p) {
|
||||
|
||||
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;
|
||||
|
||||
|
@ -372,7 +372,7 @@ static int sysv_fix_order(Service *s) {
|
||||
/* 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;
|
||||
@ -1006,7 +1006,7 @@ static int fsck_fix_order(Service *s) {
|
||||
/* 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;
|
||||
|
||||
|
@ -131,7 +131,7 @@ static void socket_done(Unit *u) {
|
||||
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)
|
||||
@ -283,7 +283,7 @@ static int socket_add_mount_links(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;
|
||||
|
||||
@ -1361,7 +1361,7 @@ static void socket_enter_running(Socket *s, int cfd) {
|
||||
|
||||
/* 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))
|
||||
|
@ -155,7 +155,7 @@ static int swap_add_mount_links(Swap *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;
|
||||
|
||||
@ -1100,7 +1100,7 @@ int swap_fd_event(Manager *m, int events) {
|
||||
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;
|
||||
@ -1111,7 +1111,7 @@ int swap_fd_event(Manager *m, int events) {
|
||||
|
||||
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) {
|
||||
|
@ -159,7 +159,7 @@ int unit_add_name(Unit *u, const char *text) {
|
||||
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);
|
||||
@ -354,7 +354,7 @@ void unit_free(Unit *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);
|
||||
|
@ -168,7 +168,7 @@ struct 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);
|
||||
|
Loading…
Reference in New Issue
Block a user