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 <sbrabec@suse.cz>
Signed-off-by: Karel Zak <kzak@redhat.com>
Reviewed-by: Lubomir Rintel <lkundrak@v3.sk>
Tested-by: Lubomir Rintel <lkundrak@v3.sk>
This commit is contained in:
Stanislav Brabec 2018-10-26 15:02:17 +02:00 committed by Karel Zak
parent 84b27596f4
commit c094fcd373
1 changed files with 3 additions and 0 deletions

View File

@ -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;
}
}