From: Stanislav Brabec Date: Fri, 26 Oct 2018 13:02:17 +0000 (+0200) Subject: agetty: when logname is erased, re-enable reloads X-Git-Tag: v2.33~13 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=c094fcd37;p=thirdparty%2Futil-linux.git 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 --- diff --git a/term-utils/agetty.c b/term-utils/agetty.c index cfcdffe93a..05a269abb9 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; } }