diff options
Diffstat (limited to 'src/login/logind-seat.c')
-rw-r--r-- | src/login/logind-seat.c | 20 |
1 files changed, 18 insertions, 2 deletions
diff --git a/src/login/logind-seat.c b/src/login/logind-seat.c index 755f20c03a..045712192a 100644 --- a/src/login/logind-seat.c +++ b/src/login/logind-seat.c @@ -104,9 +104,13 @@ int seat_save(Seat *s) { fprintf(f, "# This is private data. Do not parse.\n" "IS_VTCONSOLE=%i\n" - "CAN_MULTI_SESSION=%i\n", + "CAN_MULTI_SESSION=%i\n" + "CAN_TTY=%i\n" + "CAN_GRAPHICAL=%i\n", seat_is_vtconsole(s), - seat_can_multi_session(s)); + seat_can_multi_session(s), + seat_can_tty(s), + seat_can_graphical(s)); if (s->active) { assert(s->active->user); @@ -427,6 +431,18 @@ bool seat_can_multi_session(Seat *s) { return s->manager->console_active_fd >= 0; } +bool seat_can_tty(Seat *s) { + assert(s); + + return seat_is_vtconsole(s); +} + +bool seat_can_graphical(Seat *s) { + assert(s); + + return !!s->devices; +} + int seat_get_idle_hint(Seat *s, dual_timestamp *t) { Session *session; bool idle_hint = true; |