mirror of
https://github.com/troglobit/finit.git
synced 2026-10-21 11:29:42 +00:00
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:
1 parent
1e795d4e16
commit
94c0d1b833
9 files changed
+89
-84
No files matched your search
-10
@@ -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;
|
||||
|
||||
Reference in new issue
Block a user