summaryrefslogtreecommitdiffstats
path: root/term-utils
diff options
context:
space:
mode:
authorStanislav Brabec2018-10-26 15:02:17 +0200
committerKarel Zak2018-10-31 09:35:48 +0100
commitc094fcd373dacd3283b9f547c9a856ab21eb6484 (patch)
treeca1ad37f92c005baccf8e2162012e6eab3c580d8 /term-utils
parentdocs: add info about branches; update travis.yml (diff)
downloadkernel-qcow2-util-linux-c094fcd373dacd3283b9f547c9a856ab21eb6484.tar.gz
kernel-qcow2-util-linux-c094fcd373dacd3283b9f547c9a856ab21eb6484.tar.xz
kernel-qcow2-util-linux-c094fcd373dacd3283b9f547c9a856ab21eb6484.zip
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>
Diffstat (limited to 'term-utils')
-rw-r--r--term-utils/agetty.c3
1 files changed, 3 insertions, 0 deletions
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;
}
}