Hi Zach, On 10/17/22 19:55, Zach OKeefe wrote:
From: Zach O'Keefe <zokeefe@xxxxxxxxxx> 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@xxxxxxxxxx> --- man2/madvise.2 | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/man2/madvise.2 b/man2/madvise.2 index e14e0f7fb..adfe24c24 100644 --- a/man2/madvise.2 +++ b/man2/madvise.2 @@ -789,6 +789,13 @@ that are not mapped, the Linux version of ignores them and applies the call to the rest (but returns .B ENOMEM from the system call, as it should). +.PP +.BR madvise (0, +0, +.IR advice )
For expressions, we don't follow the same highlighting rules as in identifiers and man-page references. Instead we use all italics. See man-pages(7):
Expressions, if not written on a separate indented line, should be specified in italics. Again, the use of non‐ breaking spaces may be appropriate if the expression is inlined with normal text. Cheers, Alex
+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 ()
-- <http://www.alejandro-colomar.es/>
Attachment:
OpenPGP_signature
Description: OpenPGP digital signature