From owner-freebsd-hackers@FreeBSD.ORG Fri Oct 24 23:30:36 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 44A2F1065684 for ; Fri, 24 Oct 2008 23:30:36 +0000 (UTC) (envelope-from neldredge@math.ucsd.edu) Received: from euclid.ucsd.edu (euclid.ucsd.edu [132.239.145.52]) by mx1.freebsd.org (Postfix) with ESMTP id 2629A8FC13 for ; Fri, 24 Oct 2008 23:30:35 +0000 (UTC) (envelope-from neldredge@math.ucsd.edu) Received: from zeno.ucsd.edu (zeno.ucsd.edu [132.239.145.22]) by euclid.ucsd.edu (8.11.7p3+Sun/8.11.7) with ESMTP id m9ONUZ619136; Fri, 24 Oct 2008 16:30:35 -0700 (PDT) Received: from localhost (neldredg@localhost) by zeno.ucsd.edu (8.11.7p3+Sun/8.11.7) with ESMTP id m9ONUZS18273; Fri, 24 Oct 2008 16:30:35 -0700 (PDT) X-Authentication-Warning: zeno.ucsd.edu: neldredg owned process doing -bs Date: Fri, 24 Oct 2008 16:30:35 -0700 (PDT) From: Nate Eldredge X-X-Sender: neldredg@zeno.ucsd.edu To: Steve Franks In-Reply-To: <539c60b90810241534l6bedc5e3s1c2e3162c2a7ff38@mail.gmail.com> Message-ID: References: <539c60b90810241534l6bedc5e3s1c2e3162c2a7ff38@mail.gmail.com> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed 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: Fri, 24 Oct 2008 23:30:36 -0000 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. [snip code] -- Nate Eldredge neldredge@math.ucsd.edu