I am reading source code under Linux and reach this function:
ioctl (fd, TIOCGDEV, &devnum)
But I don't find the document about the macro TIOCGDEV
from man page, what does this macro mean ?
CodePudding user response:
"/* Get real dev no below /dev/console */"
"The TIOCGDEV ioctl is a hack written to allow bootup messages to be display both on the screen and also to be logged"
"Without the real device to which /dev/console is connected, blogd can not work."
https://www.mail-archive.com/[email protected]/msg230185.html
https://elixir.bootlin.com/linux/latest/source/drivers/tty/tty_io.c#L2747
https://arstechnica.com/civis/viewtopic.php?f=16&t=477204
https://opensuse.opensuse.narkive.com/DRN6tZW3/sle-tiocgdev-patches-for-new-kernels
I believe nowadays we have journald from systemd.