Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 17 Feb 2013 15:20:38 +0100
From:      Jilles Tjoelker <jilles@stack.nl>
To:        Dag-Erling =?iso-8859-1?Q?Sm=F8rgrav?= <des@des.no>
Cc:        Konstantin Belousov <kostikbel@gmail.com>, freebsd-arch@FreeBSD.org
Subject:   Re: bindat(2) and connectat(2) syscalls for review.
Message-ID:  <20130217142038.GA55034@stack.nl>
In-Reply-To: <86y5enaan7.fsf@ds4.des.no>
References:  <20130213230354.GC1375@garage.freebsd.pl> <20130213232004.GA2522@kib.kiev.ua> <20130213234030.GD1375@garage.freebsd.pl> <20130214185549.GA36288@stack.nl> <86ip5saqiu.fsf@ds4.des.no> <20130216232039.GD2023@garage.freebsd.pl> <86y5enaan7.fsf@ds4.des.no>

next in thread | previous in thread | raw e-mail | index | archive | help
On Sun, Feb 17, 2013 at 04:21:00AM +0100, Dag-Erling Smørgrav wrote:
> Pawel Jakub Dawidek <pjd@FreeBSD.org> writes:
> > Dag-Erling Smørgrav <des@des.no> writes:
> > > Jilles Tjoelker <jilles@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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20130217142038.GA55034>