EINVAL is an overloaded error code for madvise(2) and it's not clear
under what context it means "advice is not valid" vs another error.
Explicitly document that madvise(0, 0, advice) can reliably be used to
probe for kernel support for "advice", returning zero iff "advice" is
supported by the kernel.
Signed-off-by: Zach O'Keefe <zokeefe@google.com>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
ignores them and applies the call to the rest (but returns
.B ENOMEM
from the system call, as it should).
+.PP
+.IR madvise(0,\ 0,\ advice)
+will return zero iff
+.I advice
+is supported by the kernel and can be relied on to probe for support.
.\" .SH HISTORY
.\" The
.\" .BR madvise ()