diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/shared/util.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/shared/util.c b/src/shared/util.c index 838885a464..b77d010d2d 100644 --- a/src/shared/util.c +++ b/src/shared/util.c @@ -3700,6 +3700,16 @@ char *resolve_dev_console(char **active) { else tty = *active; + if (streq(tty, "tty0")) { + char *tmp; + + /* Get the active VC (e.g. tty1) */ + if (read_one_line_file("/sys/class/tty/tty0/active", &tmp) >= 0) { + free(*active); + tty = *active = tmp; + } + } + return tty; } |