chflagsat(2).
Pawel Jakub Dawidek
pjd at FreeBSD.org
Sun Mar 17 11:18:00 UTC 2013
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.
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.
--
Pawel Jakub Dawidek http://www.wheelsystems.com
FreeBSD committer http://www.FreeBSD.org
Am I Evil? Yes, I Am! http://tupytaj.pl
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 196 bytes
Desc: not available
URL: <http://lists.freebsd.org/pipermail/freebsd-arch/attachments/20130317/7e601d8e/attachment.sig>
More information about the freebsd-arch
mailing list