On Tue, May 17, 2011 at 01:50:19PM +0200, Karel Zak wrote: > On Mon, May 09, 2011 at 03:52:37PM +0200, Werner Fink wrote: > > Check out a virtual console line for UTF-8 support, also skip > > modem specific setups on a virtual console line. > > Applied. > > > @@ -348,18 +354,21 @@ int main(int argc, char **argv) > > debug("reading login name\n"); > > while ((logname = > > get_logname(&options, &termios, &chardata)) == 0) > > - next_speed(&options, &termios); > > + if ((options.flags & F_VCONSOLE) == 0) > > + next_speed(&options, &termios); > > } > > Does it make sense to use while() for console if next_speed() is not > called? I can imagine infinite loop here :-( > > Shouldn't be: > > if (options.flags & F_VCONSOLE)) > logname = get_logname(&options, &termios, &chardata); > else > while ((logname = > get_logname(&options, &termios, &chardata)) == 0) > next_speed(&options, &termios); > IMO no as the loop is about asking for the login name, without this the user is aked only once even if get_logname() may fail ... in mingetty the code looks like this: if (autologin) { do_prompt (0); printf ("%s%s (automatic login)\n", LOGIN, autologin); logname = autologin; logoptstr = "-f \\u"; } else { while ((logname = get_logname ()) == 0) /* do nothing */ ; } ... never seen a endless loop (beside a hickup of the keybaord it self destroying the login name) 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