From owner-freebsd-hackers@FreeBSD.ORG Sat Oct 25 07:54:32 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 B59731065676 for ; Sat, 25 Oct 2008 07:54:32 +0000 (UTC) (envelope-from en0f@bokey.mine.nu) Received: from mine.nu (60-242-68-238.static.tpgi.com.au [60.242.68.238]) by mx1.freebsd.org (Postfix) with ESMTP id 6AFBC8FC18 for ; Sat, 25 Oct 2008 07:54:32 +0000 (UTC) (envelope-from en0f@bokey.mine.nu) Received: by mine.nu (Postfix, from userid 1007) id 30B10EBBB4; Sat, 25 Oct 2008 18:06:50 +1030 (CST) X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on machapuchre.volcano.com X-Spam-Level: X-Spam-Status: No, score=-1.4 required=2.0 tests=ALL_TRUSTED autolearn=ham version=3.2.5 Received: from machapuchre.volcano.com (localhost.localdomain [127.0.0.1]) by mine.nu (Postfix) with ESMTPSA id 95E43EBBAE for ; Sat, 25 Oct 2008 18:06:39 +1030 (CST) Message-ID: <4902CC86.8030408@bokey.mine.nu> Date: Sat, 25 Oct 2008 18:06:38 +1030 From: en0f User-Agent: Mozilla-Thunderbird 2.0.0.16 (X11/20080724) MIME-Version: 1.0 To: freebsd-hackers References: <539c60b90810241534l6bedc5e3s1c2e3162c2a7ff38@mail.gmail.com> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit 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 07:54:32 -0000 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. On POSIX, errno 22 is EINVAL as well (documented in errno(3)). Is this applicable to freebsd? -- en0f