Refactor built-in getty into a standalone getty in /libexec

This patch moves the built-in getty out of Finit into /libexec/finit/,
reducing the size of the Finit binary and simplifying the code.

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
This commit is contained in:
Joachim Wiberg committed 2021-05-30 11:26:41 +02:00
1 parent 1e795d4e16
commit 94c0d1b833
9 files changed
+89 -84

No files matched your search

-10
View File
@@ -229,16 +229,6 @@ int fngetint(char *path, int *val)
return 0;
}
/*
* musl libc default to /dev/null/utmp and /dev/null/wtmp, respectively.
* See https://www.openwall.com/lists/musl/2012/03/04/4 for reasoning.
* Also, there's no __MUSL__, so we cannot make a libc-specific #ifdef
*/
int has_utmp(void)
{
return strncmp(_PATH_UTMP, "/dev/null", 9);
}
int strtobytes(char *arg)
{
int mod = 0, bytes;