bindat(2) and connectat(2) syscalls for review.

Jilles Tjoelker jilles at stack.nl
Sun Feb 17 14:20:54 UTC 2013


On Sun, Feb 17, 2013 at 04:21:00AM +0100, Dag-Erling Smørgrav wrote:
> Pawel Jakub Dawidek <pjd at FreeBSD.org> writes:
> > Dag-Erling Smørgrav <des at des.no> writes:
> > > Jilles Tjoelker <jilles at stack.nl> writes:
> > > > A flag parameter is a good thing; you may not know yet what you will
> > > > need it for.
> > > int bind(int s, const struct sockaddr *addr, socklen_t addrlen);
> > > int connect(int s, const struct sockaddr *name, socklen_t namelen);
> > > Where's the flag argument?
> > The is no flag argument in my patch, but it was proposed by Kostik in
> > the e-mail Jilles replied to.

> That was a rhetorical question...  unless Jilles wants to go through our
> entire code base and add a flag argument to every syscall or library
> function that doesn't already have one, "just in case".

The point is not to add a flags argument everywhere for the sake of it;
rather, to add a flags argument if a function is extended or created
anyway. This leaves some space for future extensibility.

For example, POSIX considered eaccess() not useful enough, but when
access() was extended to faccessat(), a flag argument was added which
allowed the eaccess() functionality.

-- 
Jilles Tjoelker


More information about the freebsd-arch mailing list