agetty: Return old behavior with empty logname

c094fcd37 introduced a behavior change: When Return is entered with empty
logname, nothing happens. As it confuses users, return back the old
behavior: re-prompt.

Signed-off-by: Stanislav Brabec <sbrabec@suse.cz>
This commit is contained in:
Stanislav Brabec 2018-11-20 00:38:14 +01:00 committed by Karel Zak
parent b7fb72090b
commit d16afd8d15
1 changed files with 1 additions and 1 deletions

View File

@ -2185,7 +2185,7 @@ static char *get_logname(struct issue *ie, struct options *op, struct termios *t
break;
}
/* Everything was erased. */
if (bp == logname)
if (bp == logname && cp->eol == '\0')
goto no_reload;
}
}