Date: Sun, 26 Oct 2008 01:30:21 +1030 From: en0f <en0f@bokey.mine.nu> To: freebsd-hackers <freebsd-hackers@freebsd.org> Subject: Re: neophyte: tcsetattr() gives 22 error in i386, not in amd64? Message-ID: <49033485.5000105@bokey.mine.nu> In-Reply-To: <20081025092157.GB86967@oberon.njm.f2s.com> References: <539c60b90810241534l6bedc5e3s1c2e3162c2a7ff38@mail.gmail.com> <Pine.GSO.4.64.0810241626430.16737@zeno.ucsd.edu> <4902CC86.8030408@bokey.mine.nu> <20081025075648.GB55339@icarus.home.lan> <4902D1FA.3070003@bokey.mine.nu> <20081025081305.GA55683@icarus.home.lan> <20081025092157.GB86967@oberon.njm.f2s.com>
next in thread | previous in thread | raw e-mail | index | archive | help
N.J. Mann wrote: > In message <20081025081305.GA55683@icarus.home.lan>, > Jeremy Chadwick (koitsu@FreeBSD.org) wrote: >> On Sat, Oct 25, 2008 at 06:29:54PM +1030, en0f wrote: >>> Jeremy Chadwick wrote: >>>> On Sat, Oct 25, 2008 at 06:06:38PM +1030, en0f 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. On POSIX, errno 22 is >>>>> EINVAL as well (documented in errno(3)). Is this applicable to freebsd? >>>> /usr/include/errno.h isn't documentation of error numbers? >>> Gahhhhh! But Jeremy, I dont have magic brains to work me way out of >>> source code :) >> You're confusing me. :P The errors in errno.h are commented, and it's >> quite readable. Of course, it matches what's in errno(3). > > Just in case someone actually goes looking for errno(3)... It is > actually errno(2), but I'm sure you knew that. :-) Was a good discussion :) Jeremy, not everyone's going to madly grep the fbsd source are they? :P Nick, I was actually reading some non-authoritative manpage online[1] so did not find one so got quite a bit excited! Found it now ;) Thanks for the pointer. I mainly subscribe to fbsd-hackers because of the pool of knowledge people have & share on the list. :) [1] !http://www.freebsd.org/cgi/man.cgi -- en0f
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?49033485.5000105>