mirror of
https://github.com/troglobit/finit.git
synced 2026-10-25 12:04:36 +00:00
tty: Debug messages when TTY is not started
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
This commit is contained in:
1 parent
f68daf1b14
commit
de05070ccc
1 file changed
+9
-3
@@ -197,18 +197,24 @@ void tty_start(finit_tty_t *fitty)
|
|||||||
int is_console = 0;
|
int is_console = 0;
|
||||||
char *tty;
|
char *tty;
|
||||||
|
|
||||||
if (fitty->pid)
|
if (fitty->pid) {
|
||||||
|
_d("%s: TTY already active", fitty->name);
|
||||||
return;
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
tty = canonicalize(fitty->name);
|
tty = canonicalize(fitty->name);
|
||||||
if (!tty)
|
if (!tty) {
|
||||||
|
_d("%s: Cannot find TTY device: %s", fitty->name, strerror(errno));
|
||||||
return;
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if (console && !strcmp(tty, console))
|
if (console && !strcmp(tty, console))
|
||||||
is_console = 1;
|
is_console = 1;
|
||||||
|
|
||||||
if (tty_check(tty))
|
if (tty_check(tty)) {
|
||||||
|
_d("%s: Not a valid TTY: %s", tty, strerror(errno));
|
||||||
return;
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
fitty->pid = run_getty(tty, fitty->baud, fitty->term, is_console);
|
fitty->pid = run_getty(tty, fitty->baud, fitty->term, is_console);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in new issue
Block a user