chflagsat(2).

Konstantin Belousov kostikbel at gmail.com
Sun Mar 17 15:59:36 UTC 2013


On Sun, Mar 17, 2013 at 12:19:31PM +0100, Pawel Jakub Dawidek wrote:
> On Sun, Mar 17, 2013 at 08:43:38AM +0200, Konstantin Belousov wrote:
> > On Sun, Mar 17, 2013 at 01:49:08AM +0100, Pawel Jakub Dawidek wrote:
> > > Hi.
> > > 
> > > The following patch adds chflagsat(2) syscall to complete other *at
> > > syscalls:
> > > 
> > > 	http://people.freebsd.org/~pjd/patches/chflagsat.patch
> > > 
> > > Note that the name chflagsat was carefully choosen instead of
> > > fchflagsat, to not repeat POSIX (more likely Linux) mistakes of using
> > > fchmodat, fchownat, futimesat, etc. names when they really shouldn't
> > > start with an 'f'.
> > 
> > This is the only point I do not agree with the patch. I prefer to have
> > the syscall name consistent with the other syscalls.
> 
> There are quite a few *at() syscalls and only few of them have bogus 'f'
> prefix (fchmodat, fchownat, fstatat, futimesat). Most of them don't
> (bindat, connectat, linkat, mkdirat, mkfifoat, mknodat, openat,
> renameat, symlinkat, unlinkat). 'f' is of course bogus, because the
> syscalls don't operate on descriptors, but on paths.
chflagsat(2) is similar to fchmodat(2) and fchownat(2), this is why
I noted about consistency.

> Also note that POSIX is moving aways from those mistakes and eventhough
> they standarized futimesat(), they now use utimensat() for nanosecond
> precision timestamps to stop those mistakes. This is actually the
> argument jilles' convinced me to use chflagsat instead of fchflagsat,
> which is originally used.
Ok.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 834 bytes
Desc: not available
URL: <http://lists.freebsd.org/pipermail/freebsd-arch/attachments/20130317/adc1f10a/attachment.sig>


More information about the freebsd-arch mailing list