mirror of
https://github.com/troglobit/finit.git
synced 2026-11-08 16:11:10 +00:00
Reorder functions a bit, group run_getty*() family
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
This commit is contained in:
1 parent
277c3dbb14
commit
f029ba2111
1 file changed
+13
-13
+13
-13
@@ -227,19 +227,6 @@ static void prepare_tty(char *tty, char *procname, int console)
|
|||||||
prctl(PR_SET_NAME, procname, 0, 0, 0);
|
prctl(PR_SET_NAME, procname, 0, 0, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
pid_t run_getty(char *tty, char *speed, char *term, int noclear, int console)
|
|
||||||
{
|
|
||||||
pid_t pid;
|
|
||||||
|
|
||||||
pid = fork();
|
|
||||||
if (!pid) {
|
|
||||||
prepare_tty(tty, "finit-getty", console);
|
|
||||||
_exit(getty(tty, speed, term, NULL));
|
|
||||||
}
|
|
||||||
|
|
||||||
return pid;
|
|
||||||
}
|
|
||||||
|
|
||||||
static int activate_console(int nowait)
|
static int activate_console(int nowait)
|
||||||
{
|
{
|
||||||
if (nowait)
|
if (nowait)
|
||||||
@@ -267,6 +254,19 @@ static int activate_console(int nowait)
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
pid_t run_getty(char *tty, char *speed, char *term, int noclear, int console)
|
||||||
|
{
|
||||||
|
pid_t pid;
|
||||||
|
|
||||||
|
pid = fork();
|
||||||
|
if (!pid) {
|
||||||
|
prepare_tty(tty, "finit-getty", console);
|
||||||
|
_exit(getty(tty, speed, term, NULL));
|
||||||
|
}
|
||||||
|
|
||||||
|
return pid;
|
||||||
|
}
|
||||||
|
|
||||||
pid_t run_getty2(char *tty, char *cmd, char *args[], int nowait, int console)
|
pid_t run_getty2(char *tty, char *cmd, char *args[], int nowait, int console)
|
||||||
{
|
{
|
||||||
pid_t pid;
|
pid_t pid;
|
||||||
|
|||||||
Reference in new issue
Block a user