mirror of
https://github.com/systemd/systemd-stable.git
synced 2025-01-27 14:03:43 +03:00
logind: don't spawn autovt getty on more VTs than configured
This commit is contained in:
parent
e7886786a6
commit
975fd86771
@ -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) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user