From owner-freebsd-bugs@FreeBSD.ORG Fri Apr 30 13:00:38 2004 Return-Path: Delivered-To: freebsd-bugs@hub.freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 54BAD16A4CE for ; Fri, 30 Apr 2004 13:00:38 -0700 (PDT) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id 28D6443D31 for ; Fri, 30 Apr 2004 13:00:38 -0700 (PDT) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) i3UK0cmF046997 for ; Fri, 30 Apr 2004 13:00:38 -0700 (PDT) (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.12.11/8.12.11/Submit) id i3UK0cQM046996; Fri, 30 Apr 2004 13:00:38 -0700 (PDT) (envelope-from gnats) Date: Fri, 30 Apr 2004 13:00:38 -0700 (PDT) Message-Id: <200404302000.i3UK0cQM046996@freefall.freebsd.org> To: freebsd-bugs@FreeBSD.org From: Valentin Nechayev Subject: Re: bin/54141: wrong behavour of cu(1) X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: Valentin Nechayev List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 30 Apr 2004 20:00:38 -0000 The following reply was made to PR bin/54141; it has been noted by GNATS. From: Valentin Nechayev To: bug-followup@freebsd.org Cc: Subject: Re: bin/54141: wrong behavour of cu(1) Date: Fri, 30 Apr 2004 22:52:48 +0300 Well, results of digging uucp: fsdirect_open() contains call of set/unset hardware flow control _always_: /* Always turn on hardware flow control for a direct port when it is opened. There is no other sensible time to turn it on. */ return fsserial_hardflow (qconn, qd->uuconf_fhardflow); Whether it will be set or unset, depends on qd->uuconf_fhardflow. qd->uuconf_fhardflow is sport.uuconf_u.uuconf_sdirect.uuconf_fhardflow, where `sport' is automatic variable of main() in cu/cu.c. This variable: 1) has no predefined initial value (i.e. contains garbage on start), 2) is rewritten in cycle around uuconf_find_port(), if /etc/uucp/port (case of Taylor configs) exists and port is similar to one wanted (e.g. has type=direct). So, whether cu would set or unset crtscts in case of no ports defined, depends on uninitialized data on stack. The source of turned on crtscts in FreeBSD >= 4.7 may be depended on gcc version, binutils version, libc start stub version, CFLAGS in make.conf, etc. The following patch fixed it for me in case with no ports defined: === cut === --- cu.c.orig Fri Apr 30 22:38:44 2004 +++ cu.c Fri Apr 30 22:46:57 2004 @@ -598,6 +598,7 @@ sport.uuconf_palloc = NULL; sport.uuconf_u.uuconf_sdirect.uuconf_zdevice = NULL; sport.uuconf_u.uuconf_sdirect.uuconf_ibaud = ibaud; + sport.uuconf_u.uuconf_sdirect.uuconf_fhardflow = 0; if (! fconn_init (&sport, &sconn, UUCONF_PORTTYPE_UNKNOWN)) ucuabort (); === end cut === If you have any direct port defined, and want cu to turn off crtscts without the patch show above, define a dummy port with `hardflow no' and put it last in port file. I can't provide any suggestion whether it should be fixed in 4.* or in ports/net/freebsd-uucp. To give applicable patch, this should at least add command-line switch to select whether crtscts should be set. -netch-