getty-generator: fix handling systems without a console

If the system does not have any active console, we should not try to
create an empty symlink. Instead, create no symlink at all.

Otherwise, on systems with CONFIG_VT=n and no serial console, we will
create a symlink with an empty template parameter.
This commit is contained in:
David Herrmann 2012-12-02 18:06:35 +01:00 committed by Kay Sievers
parent 0e168acbd6
commit a705d08519
1 changed files with 1 additions and 1 deletions

View File

@ -131,7 +131,7 @@ int main(int argc, char *argv[]) {
/* Automatically add in a serial getty on the kernel
* console */
if (tty_is_vc(tty))
if (isempty(tty) || tty_is_vc(tty))
free(active);
else {
int k;