From c094fcd373dacd3283b9f547c9a856ab21eb6484 Mon Sep 17 00:00:00 2001 From: Stanislav Brabec Date: Fri, 26 Oct 2018 15:02:17 +0200 Subject: agetty: when logname is erased, re-enable reloads When user starts to enter logname, 8b58ffdd blocks issue reloads. Reloads remain blocked even if user deletes all typed characters. Make things visually consistent: If no characters are entered, re-enable reloads. Signed-off-by: Stanislav Brabec Signed-off-by: Karel Zak Reviewed-by: Lubomir Rintel Tested-by: Lubomir Rintel --- term-utils/agetty.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'term-utils/agetty.c') diff --git a/term-utils/agetty.c b/term-utils/agetty.c index cfcdffe93..05a269abb 100644 --- a/term-utils/agetty.c +++ b/term-utils/agetty.c @@ -2182,6 +2182,9 @@ static char *get_logname(struct issue *ie, struct options *op, struct termios *t *bp++ = ascval; /* and store it */ break; } + /* Everything was erased. */ + if (bp == logname) + goto no_reload; } } -- cgit v1.2.3-55-g7522