]> git.ipfire.org Git - thirdparty/systemd.git/commit
terminal-util: handle the case where no system console is active
authorMike Yuan <me@yhndnzj.com>
Fri, 6 Feb 2026 01:07:05 +0000 (02:07 +0100)
committerMike Yuan <me@yhndnzj.com>
Tue, 10 Feb 2026 21:04:02 +0000 (22:04 +0100)
commita01cf5b2e082a015a5bd50db208a7a997923fcfd
treecf5f74eca279ae088e80acca837212ddf56233f6
parent8b736d94cdf5f2f1281f7f58c77b9676de3add1e
terminal-util: handle the case where no system console is active

/dev/console might have no backing driver, in which case
/sys/class/tty/console/active is empty. Unlike get_kernel_consoles()
resolve_dev_console() currently proceeds with empty devnode,
resulting in setup_input() -> acquire_terminal() emitting -EISDIR
as we're trying to open /dev/. Let's catch this and report -ENXIO.
src/basic/terminal-util.c