Don't try to switch TTY with KMSCON

It can do it automatically (see the corresponding service file).

Signed-off-by: AnErrupTion <anerruption@disroot.org>
This commit is contained in:
AnErrupTion
2026-02-05 19:55:40 +01:00
parent 11735290b8
commit 7744745f09

View File

@@ -573,10 +573,12 @@ pub fn main() !void {
try log_file.err("sys", "failed to get active tty: {s}", .{@errorName(err)}); try log_file.err("sys", "failed to get active tty: {s}", .{@errorName(err)});
break :no_tty_found build_options.fallback_tty; break :no_tty_found build_options.fallback_tty;
}; };
interop.switchTty(active_tty) catch |err| { if (!use_kmscon_vt) {
try info_line.addMessage(lang.err_switch_tty, config.error_bg, config.error_fg); interop.switchTty(active_tty) catch |err| {
try log_file.err("sys", "failed to switch to tty {d}: {s}", .{ active_tty, @errorName(err) }); try info_line.addMessage(lang.err_switch_tty, config.error_bg, config.error_fg);
}; try log_file.err("sys", "failed to switch to tty {d}: {s}", .{ active_tty, @errorName(err) });
};
}
if (config.initial_info_text) |text| { if (config.initial_info_text) |text| {
try info_line.addMessage(text, config.bg, config.fg); try info_line.addMessage(text, config.bg, config.fg);