X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=blobdiff_plain;f=src%2Flogin%2Flogind-seat.c;h=6e6e78af4a9a864f9b92070bc1b97bdbccf2961c;hb=b9db6972db2353eb26744c46e30e7f6d1d56e037;hp=49808c928b0db389126e7365206ae18a0c6a6936;hpb=2eec67acbb00593e414549a7e5b35eb7dd776b1b;p=elogind.git diff --git a/src/login/logind-seat.c b/src/login/logind-seat.c index 49808c928..6e6e78af4 100644 --- a/src/login/logind-seat.c +++ b/src/login/logind-seat.c @@ -29,6 +29,8 @@ #include "logind-acl.h" #include "util.h" #include "mkdir.h" +#include "formats-util.h" +#include "terminal-util.h" Seat *seat_new(Manager *m, const char *id) { Seat *s; @@ -176,34 +178,6 @@ static int vt_allocate(unsigned int vtnr) { return 0; } -int seat_preallocate_vts(Seat *s) { - int r = 0; - unsigned i; - - assert(s); - assert(s->manager); - - log_debug("Preallocating VTs..."); - - if (s->manager->n_autovts <= 0) - return 0; - - if (!seat_has_vts(s)) - return 0; - - for (i = 1; i <= s->manager->n_autovts; i++) { - int q; - - q = vt_allocate(i); - if (q < 0) { - log_error_errno(q, "Failed to preallocate VT %u: %m", i); - r = q; - } - } - - return r; -} - int seat_apply_acls(Seat *s, Session *old_active) { int r; @@ -354,7 +328,6 @@ int seat_active_vt_changed(Seat *s, unsigned int vtnr) { } r = seat_set_active(s, new_active); - manager_spawn_autovt(s->manager, vtnr); return r; } @@ -412,9 +385,6 @@ int seat_start(Seat *s) { LOG_MESSAGE("New seat %s.", s->id), NULL); - /* Initialize VT magic stuff */ - seat_preallocate_vts(s); - /* Read current VT */ seat_read_active_vt(s);