Skip to contentSkip to conversation

agetty: Return old behavior with empty logname

PATCH Applied Stanislav Brabec 2 participants 2 messages Nov 19, 2018 – Nov 21, 2018 Util-Linux package

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 agetty: Return old behavior with empty logname

c094fcd37 introduced a behavior change: When Return is entered with empty logname, nothing happens. As it confuses users, return back the old
behavior: re-prompt.

---
 term-utils/agetty.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
term-utils/agetty.c +1 -1
index 615db2c78..fc373847e 100644
@@ -2185,7 +2185,7 @@ static char *get_logname(struct issue *ie, struct options *op, struct termios *t
 				break;
 			}
 			/* Everything was erased. */
-			if (bp == logname)
+			if (bp == logname && cp->eol == '\0')
 				goto no_reload;
 		}
 	}
Signature · 13 lines
2.19.1

-- 
Best Regards / S pozdravem,

Stanislav Brabec
software developer
---------------------------------------------------------------------
SUSE LINUX, s. r. o.                         e-mail: [email protected]
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
maintainer Applied
#1 lore raw
Quoted 2 lines · Stanislav Brabec
 term-utils/agetty.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Applied, thanks.

Signature · 2 lines
 Karel Zak  <[email protected]>
 http://karelzak.blogspot.com