diff options
author | David Herrmann <dh.herrmann@gmail.com> | 2015-07-10 15:08:24 +0200 |
---|---|---|
committer | David Herrmann <dh.herrmann@gmail.com> | 2015-07-10 15:25:44 +0200 |
commit | e6494a07cbbfa93dd83782fa1f8554aa4d2353bd (patch) | |
tree | b5bd8d81b7d861e52c46dd61480a41958df4368e /src/login/logind-seat.c | |
parent | cc85d56245a21e458dbc955fbf94fa9b3bfb9e33 (diff) |
logind: rename 'pos' to 'position'
Spell out the proper name. Use 'pos' over 'position', and also update the
logind state file to do the same. Note that this breaks live updates.
However, we only save 'POSITION' on non-seat0, so this shouldn't bother
anyone for real. If you run multi-seat setups, you better restart a
machine on updates, anyway.
Diffstat (limited to 'src/login/logind-seat.c')
-rw-r--r-- | src/login/logind-seat.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/src/login/logind-seat.c b/src/login/logind-seat.c index fb5d076311..9d5287ad35 100644 --- a/src/login/logind-seat.c +++ b/src/login/logind-seat.c @@ -290,8 +290,8 @@ int seat_switch_to_next(Seat *s) { return -EINVAL; start = 1; - if (s->active && s->active->pos > 0) - start = s->active->pos; + if (s->active && s->active->position > 0) + start = s->active->position; for (i = start + 1; i < s->position_count; ++i) if (s->positions[i]) @@ -311,8 +311,8 @@ int seat_switch_to_previous(Seat *s) { return -EINVAL; start = 1; - if (s->active && s->active->pos > 0) - start = s->active->pos; + if (s->active && s->active->position > 0) + start = s->active->position; for (i = start - 1; i > 0; --i) if (s->positions[i]) @@ -472,9 +472,9 @@ int seat_stop_sessions(Seat *s, bool force) { void seat_evict_position(Seat *s, Session *session) { Session *iter; - unsigned int pos = session->pos; + unsigned int pos = session->position; - session->pos = 0; + session->position = 0; if (pos == 0) return; @@ -486,7 +486,7 @@ void seat_evict_position(Seat *s, Session *session) { * position (eg., during gdm->session transition), so let's look * for it and set it on the free slot. */ LIST_FOREACH(sessions_by_seat, iter, s->sessions) { - if (iter->pos == pos) { + if (iter->position == pos) { s->positions[pos] = iter; break; } @@ -504,7 +504,7 @@ void seat_claim_position(Seat *s, Session *session, unsigned int pos) { seat_evict_position(s, session); - session->pos = pos; + session->position = pos; if (pos > 0 && !s->positions[pos]) s->positions[pos] = session; } @@ -512,7 +512,7 @@ void seat_claim_position(Seat *s, Session *session, unsigned int pos) { static void seat_assign_position(Seat *s, Session *session) { unsigned int pos; - if (session->pos > 0) + if (session->position > 0) return; for (pos = 1; pos < s->position_count; ++pos) |