main: special case console=tty

Some people use console=tty in the same way they'd expect
console=tty0 to work.

This commit makes them behave the same way.
This commit is contained in:
Ray Strode 2011-05-25 14:28:42 -04:00
parent 113b2e2772
commit 1d09ad7d51

View file

@ -1838,7 +1838,8 @@ check_for_consoles (state_t *state,
if (end != NULL)
*end = '\0';
if (strcmp (console, "tty0") == 0 || strcmp (console, "/dev/tty0") == 0)
if (strcmp (console, "tty0") == 0 || strcmp (console, "/dev/tty0") == 0 ||
strcmp (console, "tty") == 0 || strcmp (console, "tty") == 0)
{
free (console);
console = strdup (default_tty);