From owner-freebsd-arch@FreeBSD.ORG Sun Feb 17 14:20:54 2013 Return-Path: Delivered-To: freebsd-arch@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 6125AFA9; Sun, 17 Feb 2013 14:20:54 +0000 (UTC) (envelope-from jilles@stack.nl) Received: from mx1.stack.nl (unknown [IPv6:2001:610:1108:5012::107]) by mx1.freebsd.org (Postfix) with ESMTP id 298B29C7; Sun, 17 Feb 2013 14:20:54 +0000 (UTC) Received: from snail.stack.nl (snail.stack.nl [IPv6:2001:610:1108:5010::131]) by mx1.stack.nl (Postfix) with ESMTP id DEDAA1203C5; Sun, 17 Feb 2013 15:20:38 +0100 (CET) Received: by snail.stack.nl (Postfix, from userid 1677) id C96CF2848C; Sun, 17 Feb 2013 15:20:38 +0100 (CET) Date: Sun, 17 Feb 2013 15:20:38 +0100 From: Jilles Tjoelker To: Dag-Erling =?iso-8859-1?Q?Sm=F8rgrav?= Subject: Re: bindat(2) and connectat(2) syscalls for review. Message-ID: <20130217142038.GA55034@stack.nl> 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> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <86y5enaan7.fsf@ds4.des.no> User-Agent: Mutt/1.5.21 (2010-09-15) Cc: Konstantin Belousov , freebsd-arch@FreeBSD.org X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 17 Feb 2013 14:20:54 -0000 On Sun, Feb 17, 2013 at 04:21:00AM +0100, Dag-Erling Smørgrav wrote: > Pawel Jakub Dawidek writes: > > Dag-Erling Smørgrav writes: > > > Jilles Tjoelker 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