Refactor TTY code to honor runlevels and use I/O plugin to watch /dev

Add support for runlevels to tty command and support for reading baud
rate and TERM variable from finit.conf.

The tty-watcher thread has been converted to a standard I/O plugin.

Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
This commit is contained in:
Joachim Nilsson committed 2013-06-06 18:19:26 +02:00
1 parent f97aab4699
commit 0f60aa2289
13 files changed
+391 -144

No files matched your search

+8 -7
View File
@@ -37,12 +37,16 @@
#if defined EMBEDDED_SYSTEM
# define CONSOLE "/dev/console"
# define SETUP_DEVFS "/sbin/mdev -s"
# define GETTY "/sbin/getty -L 115200 %s vt100"
# define GETTY "/sbin/getty -L"
# define GETTY_BUSYBOX
# define BAUDRATE 115200
# define RUNLEVEL 2
#else /* Debian/Ubuntu based distributions */
# define CONSOLE "/dev/tty1"
# define SETUP_DEVFS "/sbin/udevd --daemon"
# define GETTY "/sbin/getty -8 38400 %s"
# define GETTY "/sbin/getty -8"
# define GETTY_AGETTY
# define BAUDRATE 38400
# define RUNLEVEL 2
# define RANDOMSEED "/var/lib/urandom/random-seed"
# define REMOUNT_ROOTFS_RW
@@ -84,11 +88,8 @@ extern char *console;
extern char *__progname;
/* conf.c */
void parse_finit_conf(char *file);
/* tty.c */
void tty_start(void);
int tty_add(char *tty, int baud);
int parse_runlevels (char *runlevels);
void parse_finit_conf (char *file);
#endif /* FINIT_H_ */