]> git.ipfire.org Git - thirdparty/util-linux.git/commit
agetty: split out speed table and baud code to tty.c
authorKarel Zak <kzak@redhat.com>
Thu, 14 May 2026 08:37:35 +0000 (10:37 +0200)
committerKarel Zak <kzak@redhat.com>
Thu, 14 May 2026 11:14:57 +0000 (13:14 +0200)
commit013d461116aebad84e89eee0035267303fc35ae1
treeb8415809313f267e916221705388ac2769fc58d0
parenteda4fdfc62381c1d87aa2d4364f88754495b17ad
agetty: split out speed table and baud code to tty.c

Move speedtab[], struct Speedtab, bcode() and list_speeds() to a
new tty.c file as agetty_bcode() and agetty_list_speeds(). The
speed table is kept static in tty.c.

Add agetty_fprint_speed() to print the numeric baud rate for a
given speed code, replacing the open-coded speedtab[] lookup in
output_special_char() case 'b'.

Signed-off-by: Karel Zak <kzak@redhat.com>
agetty-cmd/Makemodule.am
agetty-cmd/agetty.c
agetty-cmd/agetty.h
agetty-cmd/meson.build
agetty-cmd/tty.c [new file with mode: 0644]