madvise.2: document reliable probe for advice support
commitbd14f1e3236a1f016b7a8a85deb34379c4470687
authorZach O'Keefe <zokeefe@google.com>
Fri, 21 Oct 2022 22:32:58 +0000 (21 15:32 -0700)
committerAlejandro Colomar <alx@kernel.org>
Sun, 30 Oct 2022 11:43:55 +0000 (30 12:43 +0100)
tree912e0979304d752663f864e3cdaee7eaed94bcdc
parent797a95e0e67a71deda18c0f6a1c3159cd9c12832
madvise.2: document reliable probe for advice support

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>
man2/madvise.2