summaryrefslogtreecommitdiff
path: root/src/login/logind-session.c
diff options
context:
space:
mode:
authorDavid Herrmann <dh.herrmann@gmail.com>2015-07-10 15:08:24 +0200
committerDavid Herrmann <dh.herrmann@gmail.com>2015-07-10 15:25:44 +0200
commite6494a07cbbfa93dd83782fa1f8554aa4d2353bd (patch)
treeb5bd8d81b7d861e52c46dd61480a41958df4368e /src/login/logind-session.c
parentcc85d56245a21e458dbc955fbf94fa9b3bfb9e33 (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-session.c')
-rw-r--r--src/login/logind-session.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/login/logind-session.c b/src/login/logind-session.c
index 6a450b02a0..45f4c09d3d 100644
--- a/src/login/logind-session.c
+++ b/src/login/logind-session.c
@@ -264,7 +264,7 @@ int session_save(Session *s) {
fprintf(f, "VTNR=%u\n", s->vtnr);
if (!s->vtnr)
- fprintf(f, "POS=%u\n", s->pos);
+ fprintf(f, "POSITION=%u\n", s->position);
if (s->leader > 0)
fprintf(f, "LEADER="PID_FMT"\n", s->leader);
@@ -302,7 +302,7 @@ int session_load(Session *s) {
*seat = NULL,
*vtnr = NULL,
*state = NULL,
- *pos = NULL,
+ *position = NULL,
*leader = NULL,
*type = NULL,
*class = NULL,
@@ -329,7 +329,7 @@ int session_load(Session *s) {
"DESKTOP", &s->desktop,
"VTNR", &vtnr,
"STATE", &state,
- "POS", &pos,
+ "POSITION", &position,
"LEADER", &leader,
"TYPE", &type,
"CLASS", &class,
@@ -388,10 +388,10 @@ int session_load(Session *s) {
if (!s->seat || !seat_has_vts(s->seat))
s->vtnr = 0;
- if (pos && s->seat) {
+ if (position && s->seat) {
unsigned int npos;
- safe_atou(pos, &npos);
+ safe_atou(position, &npos);
seat_claim_position(s->seat, s, npos);
}