posix_fallocate(2) && posix_fadvise(2) are somewhat broken

From: Maxim Sobolev <sobomax_at_FreeBSD.org>
Date: Tue, 8 Dec 2015 01:35:31 -0800
Hi, while working on some unrelated feature I've noticed that at least
those two system calls are not returning proper value (-1) on error.
Instead actual errno value is returned from the syscall verbatim,
i.e. posix_fadvise() returns 22 on EINVAL. Attached patch fixes that
problem, however I am not sure if I need to assign td->td_retval[0] at all,
those two operations by design never return anything but -1 on error and 0
on success. Can someone comment on this? Thanks!

Received on Tue Dec 08 2015 - 08:35:33 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:41:01 UTC