From 4470d73996490701dd68db61ee91c760ba39841c Mon Sep 17 00:00:00 2001 From: Warner Losh Date: Fri, 27 Sep 2019 16:11:47 +0000 Subject: [PATCH] Document varadic args as int, since you can't have short varadic args (they are promoted to ints). - `mode_t` is `uint16_t` (`sys/sys/_types.h`) - `openat` takes variadic args - variadic args cannot be 16-bit, and indeed the code uses int - the manpage currently kinda implies the argument is 16-bit by saying `mode_t` Prompted by Rust things: https://github.com/tailhook/openat/issues/21 Submitted by: Greg V at unrelenting Differential Revision: https://reviews.freebsd.org/D21816 --- lib/libc/sys/mq_open.2 | 2 +- lib/libc/sys/open.2 | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/libc/sys/mq_open.2 b/lib/libc/sys/mq_open.2 index ef6154b7ff5..9b02d509c52 100644 --- a/lib/libc/sys/mq_open.2 +++ b/lib/libc/sys/mq_open.2 @@ -133,7 +133,7 @@ Create a message queue. It requires two additional arguments: .Fa mode , which is of type -.Vt mode_t , +.Vt int , and .Fa attr , which is a pointer to an diff --git a/lib/libc/sys/open.2 b/lib/libc/sys/open.2 index fe50b292d1b..a771461e2e4 100644 --- a/lib/libc/sys/open.2 +++ b/lib/libc/sys/open.2 @@ -61,7 +61,7 @@ In this case and .Fn openat require an additional argument -.Fa "mode_t mode" , +.Fa "int mode" , and the file is created with mode .Fa mode as described in