From 975fd86771220287cdc30824760ff147913a0bd6 Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Tue, 28 Jun 2011 03:05:33 +0200 Subject: [PATCH] logind: don't spawn autovt getty on more VTs than configured --- src/logind.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/logind.c b/src/logind.c index 8507c2e1..bb64ab28 100644 --- a/src/logind.c +++ b/src/logind.c @@ -683,9 +683,14 @@ int manager_spawn_autovt(Manager *m, int vtnr) { dbus_error_init(&error); + if (vtnr > m->n_autovts) + return 0; + r = vt_is_busy(vtnr); - if (r != 0) + if (r < 0) return r; + else if (r > 0) + return -EBUSY; message = dbus_message_new_method_call("org.freedesktop.systemd1", "/org/freedesktop/systemd1", "org.freedesktop.systemd1.Manager", "StartUnit"); if (!message) { -- 2.39.5