diff options
author | Ray Strode <rstrode@redhat.com> | 2018-08-31 15:20:39 -0400 |
---|---|---|
committer | Ray Strode <rstrode@redhat.com> | 2018-08-31 16:43:21 -0400 |
commit | a6f5373522acd5f753d330478b605c9812a3e5ae (patch) | |
tree | e810e8af57e3b08e97b2329e43f1c9cb1feea8e8 /daemon/gdm-session-worker.c | |
parent | 5883b17072003d34b95294fade9c81b216965092 (diff) | |
download | gdm-a6f5373522acd5f753d330478b605c9812a3e5ae.tar.gz |
session-worker: fix current vt detection short-circuit logic
commit 8169cd4 attempts to avoid changing VTs if the active VT
is the same as the VT getting jumped to.
It fails to work, however, because accidentally treats a 0 return
code to the VT_GETSTATE ioctl as failure.
this commit fixes that.
Diffstat (limited to 'daemon/gdm-session-worker.c')
-rw-r--r-- | daemon/gdm-session-worker.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/daemon/gdm-session-worker.c b/daemon/gdm-session-worker.c index 3fde9cbc..06e5a6a8 100644 --- a/daemon/gdm-session-worker.c +++ b/daemon/gdm-session-worker.c @@ -1002,7 +1002,7 @@ jump_to_vt (GdmSessionWorker *worker, handle_terminal_vt_switches (worker, fd); - if (ioctl (fd, VT_GETSTATE, &vt_state) <= 0) { + if (ioctl (fd, VT_GETSTATE, &vt_state) < 0) { g_debug ("GdmSessionWorker: couldn't get current VT: %m"); } else { active_vt = vt_state.v_active; |