]> git.ipfire.org Git - thirdparty/util-linux.git/commit
agetty: use getttynam() if available
authorLudwig Nussel <ludwig.nussel@suse.de>
Thu, 21 Oct 2021 13:00:59 +0000 (15:00 +0200)
committerKarel Zak <kzak@redhat.com>
Mon, 25 Oct 2021 08:32:25 +0000 (10:32 +0200)
commit1cf6e936e308166fffdc2d703c4ade2e8cbe5e51
tree51c33ce8c89a7091b37fd14e00bbe011f0ed8307
parent421a482ac2b7fbd916a3655ae3da2af4a018a91c
agetty: use getttynam() if available

/etc/ttys seems to be a rather archaic concept that is not meant to
exist on Linux. Nevertheless it does. glibc has getttynam() which
correctly parses /etc/ttys. So let's give it a try before falling back
to the built in defaults. One can set the terminal type for a
specific tty using e.g.:

echo 'ttyS0 "" xterm' > /etc/ttys

[kzak@redhat.com: - improve configure.ac part
                  - log error on failed strdup()]

Signed-off-by: Karel Zak <kzak@redhat.com>
configure.ac
term-utils/agetty.c