diff options
author | Lennart Poettering <lennart@poettering.net> | 2012-01-03 21:47:54 +0100 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2012-01-03 21:47:54 +0100 |
commit | addedec48ba0ffc4472ef6d3b5a45c9d4239f1cd (patch) | |
tree | 867929927cbe2ca2866511d81b5fa4e998531839 /src/login/logind.c | |
parent | dc4b02006455a4dddeb6ccc1f6656c89d3ebd27c (diff) |
logind: if we can't open /dev/tty0, assume there is no VT subsystem and don't pretend we could do VT switching
Diffstat (limited to 'src/login/logind.c')
-rw-r--r-- | src/login/logind.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/login/logind.c b/src/login/logind.c index 4633a5ef29..3a1903ca13 100644 --- a/src/login/logind.c +++ b/src/login/logind.c @@ -655,7 +655,6 @@ int manager_dispatch_seat_udev(Manager *m) { return r; } - int manager_dispatch_vcsa_udev(Manager *m) { struct udev_device *d; int r = 0; @@ -906,6 +905,12 @@ static int manager_connect_console(Manager *m) { m->console_active_fd = open("/sys/class/tty/tty0/active", O_RDONLY|O_NOCTTY|O_CLOEXEC); if (m->console_active_fd < 0) { + + /* On certain architectures (S390 and Xen), /dev/tty0 + does not exist, so don't fail if we can't open it.*/ + if (errno == ENOENT) + return 0; + log_error("Failed to open /sys/class/tty/tty0/active: %m"); return -errno; } |