From owner-freebsd-hackers@FreeBSD.ORG Sat Oct 25 09:46:43 2008 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id CD042106566C for ; Sat, 25 Oct 2008 09:46:43 +0000 (UTC) (envelope-from njm@njm.f2s.com) Received: from mk-outboundfilter-6-a-2.mail.uk.tiscali.com (mk-outboundfilter-6-a-2.mail.uk.tiscali.com [212.74.114.16]) by mx1.freebsd.org (Postfix) with ESMTP id 5F30F8FC17 for ; Sat, 25 Oct 2008 09:46:43 +0000 (UTC) (envelope-from njm@njm.f2s.com) X-Trace: 42852877/mk-outboundfilter-6.mail.uk.tiscali.com/F2S/$F2S-ACCEPTED/f2s-freedom2Surf-customers/195.137.21.170 X-SBRS: None X-RemoteIP: 195.137.21.170 X-IP-MAIL-FROM: njm@njm.f2s.com X-IP-BHB: Once X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: ApsEAHSAAknDiRWq/2dsb2JhbACBdr5ug08 X-IronPort-AV: E=Sophos;i="4.33,482,1220223600"; d="scan'208";a="42852877" X-IP-Direction: IN Received: from i-195-137-21-170.freedom2surf.net (HELO oberon.njm.f2s.com) ([195.137.21.170]) by smtp.f2s.tiscali.co.uk with ESMTP/TLS/DHE-RSA-AES256-SHA; 25 Oct 2008 10:17:22 +0100 Received: from oberon.njm.f2s.com (localhost.njm.f2s.com [127.0.0.1]) by oberon.njm.f2s.com (8.14.3/8.14.3) with ESMTP id m9P9HMYt087034; Sat, 25 Oct 2008 10:17:22 +0100 (BST) (envelope-from njm@oberon.njm.f2s.com) Received: (from njm@localhost) by oberon.njm.f2s.com (8.14.3/8.14.3/Submit) id m9P9HLpg087033; Sat, 25 Oct 2008 10:17:21 +0100 (BST) (envelope-from njm) Date: Sat, 25 Oct 2008 10:17:21 +0100 From: "N.J. Mann" To: en0f Message-ID: <20081025091721.GA86967@oberon.njm.f2s.com> Mail-Followup-To: en0f , freebsd-hackers References: <539c60b90810241534l6bedc5e3s1c2e3162c2a7ff38@mail.gmail.com> <4902CC86.8030408@bokey.mine.nu> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4902CC86.8030408@bokey.mine.nu> X-Operating-System: FreeBSD 7.1-PRERELEASE User-Agent: Mutt/1.5.18cvs (2008-07-02) Cc: freebsd-hackers Subject: Re: neophyte: tcsetattr() gives 22 error in i386, not in amd64? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 25 Oct 2008 09:46:43 -0000 In message <4902CC86.8030408@bokey.mine.nu>, en0f (en0f@bokey.mine.nu) wrote: > Nate Eldredge wrote: > > On Fri, 24 Oct 2008, Steve Franks wrote: > > > >> Hi, > >> > >> I'm getting a 22 errno from tcsetattr() on 7-STABLE i386 in code which > >> was working under 7-STABLE amd64. Serial device is a ucom (silabs > >> cp2103). Permissions on /dev/cuaU0 look fine. Cutecom/Minicom > >> appears to open the port without error... > > > > I don't see anything obviously wrong, but I'd bet a bug related to > > 32/64-bit types. Can you post a complete piece of code that can be > > compiled and run and demonstrates the problem? Also, try compiling with > > -Wall -W and investigate any warnings that are produced. > > > > By the way, errno 22 is EINVAL, "Invalid argument". perror() is your > > friend. > > Strange freebsd doesnt document error numbers. man errno Cheers, Nick. --