[openbeosnetteam] Re: CVS: net_kit/source/driver net_stack_driver.c,1.4,1.5
- From: philippe.houdoin@xxxxxxx
- To: openbeosnetteam@xxxxxxxxxxxxx
- Date: Tue, 30 Apr 2002 11:47:25 +0200 (MEST)
David wrote:>
> The code we had wasn't actually doing what we needed, which was why it
> needed to be changed.
>
> connect, bind and other all return -1 if they fail and set errno, so
> having libnet returning the error isn't correct.
Okay, I see your point here.
> However, if we return the error from the ioctl value we get -1 as
> the ioctl return (so it can just be passed back) and errno is
> set correctly with the appropriate value.
My mistake, my mind was still locked on this strange select() / ioctl()
*bug*
(http://www.freelists.org/archives/openbeosnetteam/03-2002/msg00157.html)
you did encounter once...
What I didn't know/understand at this time is that all driver hooks returning
status_t set in fact errno on negative value and the corresponding
userland calls return a -1 instead.
I will fix this in libnet.so and net_stack_driver.c asap.
-Philippe
- References:
- [openbeosnetteam] Re: CVS: net_kit/source/driver net_stack_driver.c,1.4,1.5
- From: Philippe Houdoin
- [openbeosnetteam] Re: CVS: net_kit/source/driver net_stack_driver.c,1.4,1.5
- From: David Reid
Other related posts:
- » [openbeosnetteam] Re: CVS: net_kit/source/driver net_stack_driver.c,1.4,1.5
- » [openbeosnetteam] Re: CVS: net_kit/source/driver net_stack_driver.c,1.4,1.5
- » [openbeosnetteam] Re: CVS: net_kit/source/driver net_stack_driver.c,1.4,1.5
- [openbeosnetteam] Re: CVS: net_kit/source/driver net_stack_driver.c,1.4,1.5
- From: Philippe Houdoin
- [openbeosnetteam] Re: CVS: net_kit/source/driver net_stack_driver.c,1.4,1.5
- From: David Reid