From owner-freebsd-questions@FreeBSD.ORG Fri Mar 16 16:01:58 2007 Return-Path: X-Original-To: freebsd-questions@freebsd.org Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 8658516A400 for ; Fri, 16 Mar 2007 16:01:58 +0000 (UTC) (envelope-from dan@more.net) Received: from jane.spg.more.net (jane.spg.more.net [207.160.133.140]) by mx1.freebsd.org (Postfix) with ESMTP id 5EA0C13C44B for ; Fri, 16 Mar 2007 16:01:58 +0000 (UTC) (envelope-from dan@more.net) Received: from [127.0.0.1] (localhost [127.0.0.1]) by jane.spg.more.net (Postfix) with ESMTP id 598919C0F3; Fri, 16 Mar 2007 11:02:00 -0500 (CDT) From: Dan D Niles To: FreeBSD Questions In-Reply-To: <226ae0c60703160816v3d90ec0eg29bac15a5676f875@mail.gmail.com> References: <226ae0c60703160816v3d90ec0eg29bac15a5676f875@mail.gmail.com> Content-Type: multipart/mixed; boundary="=-YNkutSZD+bJOqjKKFg9i" Date: Fri, 16 Mar 2007 11:02:00 -0500 Message-Id: <1174060920.16417.10.camel@jane.spg.more.net> Mime-Version: 1.0 X-Mailer: Evolution 2.8.1 Cc: David Robillard Subject: Re: Serial Port Problems (Solved) X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 Mar 2007 16:01:58 -0000 --=-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--