Date: Fri, 16 Mar 2007 11:02:00 -0500 From: Dan D Niles <dan@more.net> To: FreeBSD Questions <freebsd-questions@freebsd.org> Cc: David Robillard <david.robillard@gmail.com> Subject: Re: Serial Port Problems (Solved) Message-ID: <1174060920.16417.10.camel@jane.spg.more.net> In-Reply-To: <226ae0c60703160816v3d90ec0eg29bac15a5676f875@mail.gmail.com> References: <226ae0c60703160816v3d90ec0eg29bac15a5676f875@mail.gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
--=-YNkutSZD+bJOqjKKFg9i Content-Type: text/plain Content-Transfer-Encoding: 7bit On Fri, 2007-03-16 at 11:16 -0400, David Robillard wrote: > That being said, I checked /usr/src/libexec/getty/main.c to find out > how to recreate your fix. But I'm not a huge C programmer, so I tried > other ways to solve this. I submitted a bug report and patch, but it has not been accepted yet. I'm not even sure that it has been reviewed. I'll attach my patch to this message. > That brought me to gettytab(5) which says that the "de" field controls > the "delay secs and flush input before writing first prompt" as the > man page puts it. This puts a delay before the first prompt but not the prompts after entering a null login name or other invalid input. It could help if you were having problems with garbled output all the time not just after invalid input. If that is the case, you probably need to set de and use my patch. Dan --=-YNkutSZD+bJOqjKKFg9i Content-Disposition: attachment; filename=patch.getty Content-Type: text/plain; name=patch.getty; charset=us-ascii Content-Transfer-Encoding: 7bit --- libexec/getty/main.c.orig Tue Mar 6 15:55:35 2007 +++ libexec/getty/main.c Tue Mar 6 15:58:06 2007 @@ -295,6 +295,8 @@ /* remove any noise */ (void)tcflush(STDIN_FILENO, TCIOFLUSH); } + if (!first_sleep) + sleep(1); first_sleep = 0; setttymode(0); @@ -376,6 +378,7 @@ continue; if (name[0] == '-') { puts("user names may not start with '-'."); + oflush(); continue; } if (!(upper || lower || digit)) { --=-YNkutSZD+bJOqjKKFg9i--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?1174060920.16417.10.camel>