summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlejandro Colomar <alx@kernel.org>2023-05-19 15:02:16 +0200
committerAlejandro Colomar <alx@kernel.org>2023-05-20 12:04:12 +0200
commit12ff884e9ef392a5eb36a3f7a3c81a4185de5c16 (patch)
tree8ab4c90854e4be5879125516e53eea2f9afc9fe7
parent7fd1e0f2be216a5e7f7aef0d03304bdf81bca9e0 (diff)
open.2, prctl.2: SYNOPSIS: Document these as variadic functions
I remember I discussed this with Michael Kerrisk a long ago and we agreed to apply this fix, as I felt that using overload syntax was confusing (especially since C doesn't allow overloads), but then I didn't feel urged to write a patch. Florian confirmed recently that this is confusing to more programmers, so let's do it. Link: <https://bugzilla.kernel.org/show_bug.cgi?id=216876#c1> Reported-by: Florian Weimer <fweimer@redhat.com> Cc: Michael Kerrisk <mtk.manpages@gmail.com> Signed-off-by: Alejandro Colomar <alx@kernel.org>
-rw-r--r--man2/open.211
-rw-r--r--man2/prctl.25
2 files changed, 8 insertions, 8 deletions
diff --git a/man2/open.2 b/man2/open.2
index f79330a17..4c921723c 100644
--- a/man2/open.2
+++ b/man2/open.2
@@ -38,18 +38,17 @@ Standard C library
.nf
.B #include <fcntl.h>
.PP
-.BI "int open(const char *" pathname ", int " flags );
-.BI "int open(const char *" pathname ", int " flags ", mode_t " mode );
+.BI "int open(const char *" pathname ", int " flags ", ..."
+.BI " \fR/*\fP mode_t " mode " \fR*/\fP );"
.PP
.BI "int creat(const char *" pathname ", mode_t " mode );
.PP
-.BI "int openat(int " dirfd ", const char *" pathname ", int " flags );
-.BI "int openat(int " dirfd ", const char *" pathname ", int " flags \
-", mode_t " mode );
+.BI "int openat(int " dirfd ", const char *" pathname ", int " flags ", ..."
+.BI " \fR/*\fP mode_t " mode " \fR*/\fP );"
.PP
/* Documented separately, in \fBopenat2\fP(2): */
.BI "int openat2(int " dirfd ", const char *" pathname ,
-.BI " const struct open_how *" how ", size_t " size ");"
+.BI " const struct open_how *" how ", size_t " size );
.fi
.PP
.RS -4
diff --git a/man2/prctl.2 b/man2/prctl.2
index 88d94b7e8..09e9072fa 100644
--- a/man2/prctl.2
+++ b/man2/prctl.2
@@ -46,8 +46,9 @@ Standard C library
.nf
.B #include <sys/prctl.h>
.PP
-.BI "int prctl(int " option ", unsigned long " arg2 ", unsigned long " arg3 ,
-.BI " unsigned long " arg4 ", unsigned long " arg5 );
+.BI "int prctl(int " option ", ..."
+.BI " \fR/*\fP unsigned long " arg2 ", unsigned long " arg3 ,
+.BI " unsigned long " arg4 ", unsigned long " arg5 " \fR*/\fP );"
.fi
.SH DESCRIPTION
.BR prctl ()