From f029ba2111fabaf3d6866ccb4b4ab4ebdbc7f675 Mon Sep 17 00:00:00 2001 From: Joachim Nilsson Date: Fri, 1 Sep 2017 05:50:50 +0200 Subject: [PATCH] Reorder functions a bit, group run_getty*() family Signed-off-by: Joachim Nilsson --- src/exec.c | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/src/exec.c b/src/exec.c index 12b2cf4c..dc07a828 100644 --- a/src/exec.c +++ b/src/exec.c @@ -227,19 +227,6 @@ static void prepare_tty(char *tty, char *procname, int console) 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) { if (nowait) @@ -267,6 +254,19 @@ static int activate_console(int nowait) 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 pid;