On Tue, May 17, 2011 at 02:07:15PM +0200, Karel Zak wrote: > On Tue, May 10, 2011 at 05:34:30PM +0200, Dr. Werner Fink wrote: > > Better support of virtual console due support of UTF-8 login names > > provided by e.g. LDAP. Set default size 24/80 on serial modem lines > > if not found by the kernel. > > Applied, but... > > > @@ -1095,92 +1118,134 @@ static char *get_logname(struct options *op, struct termios *tp, struct chardata > [...] > > - /* Do BREAK handling elsewhere. */ > > - if ((c == 0) && op->numspeed > 1) > > - return EXIT_SUCCESS; > > the original get_logname() returns zero > > > /* Do erase, kill and end-of-line processing. */ > > switch (ascval) { > > + case 0: > > + *bp = 0; > > + if (op->numspeed > 1) > > + return logname; > > + break; > > your new version does not return zero. The code in main() checks for > the zero to call next_speed(). > > It seems like a bug, right? Yes and also No ... if a CBREAK happens that is normally the read() will see a zero the former get_logname() returns due to the implicit cast to (char*) simply NULL. With the new code the current login name will be terminated by 0 and returned. The question is: If a CBREAK happens in both cases the login name has to be repeated, in the old code the prompt for the login is simply shown again regardless what was typed in in the new code the part of the login name does not exist as a user but now the agetty asks for a password. For the later case I'd like to say it's a bug ... Maybe there is a way to handle such CBREAKS more efficiently as the array logname is already a static one and will remember the already typed characters. For this get_logname() may not overwrite the start of logname if it has seen a CBREAK before. But this will become a more complex code (IMHO). Werner -- "Having a smoking section in a restaurant is like having a peeing section in a swimming pool." -- Edward Burr -- To unsubscribe from this list: send the line "unsubscribe util-linux" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html