util-linux.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] agetty: when logname is erased, re-enable reloads
@ 2018-10-26 13:02 Stanislav Brabec
  2018-10-27 15:17 ` Lubomir Rintel
  0 siblings, 1 reply; 3+ messages in thread
From: Stanislav Brabec @ 2018-10-26 13:02 UTC (permalink / raw)
  To: util-linux; +Cc: Lubomir Rintel, Karel Zak

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>
Cc: Lubomir Rintel <lkundrak@v3.sk>
Cc: Karel Zak <kzak@redhat.com>
---
 term-utils/agetty.c | 3 +++
 1 file changed, 3 insertions(+)

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

-- 
Best Regards / S pozdravem,

Stanislav Brabec
software developer
---------------------------------------------------------------------
SUSE LINUX, s. r. o.                         e-mail: sbrabec@suse.com
Křižíkova 148/34 (Corso IIa)                  tel: +49 911 7405384547
186 00 Praha 8-Karlín                          fax:  +420 284 084 001
Czech Republic                                    http://www.suse.cz/
PGP: 830B 40D5 9E05 35D8 5E27 6FA3 717C 209F A04F CD76

^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2018-10-31  8:37 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-10-26 13:02 [PATCH] agetty: when logname is erased, re-enable reloads Stanislav Brabec
2018-10-27 15:17 ` Lubomir Rintel
2018-10-31  8:37   ` Karel Zak

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).