public inbox for linux-man@vger.kernel.org
 help / color / mirror / Atom feed
From: Alejandro Colomar <alx.manpages@gmail.com>
To: linux-man@vger.kernel.org
Cc: Alejandro Colomar <alx@kernel.org>, Florian Weimer <fweimer@redhat.com>
Subject: [PATCH] open.2, prctl.2: SYNOPSIS: Document these as variadic functions
Date: Fri, 19 May 2023 15:15:47 +0200	[thread overview]
Message-ID: <20230519131546.25232-1-alx@kernel.org> (raw)

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.

Reported-by: Florian Weimer <fweimer@redhat.com>
Link: <https://bugzilla.kernel.org/show_bug.cgi?id=216876#c1>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
---
 man2/open.2  | 11 +++++------
 man2/prctl.2 |  5 +++--
 2 files changed, 8 insertions(+), 8 deletions(-)

diff --git a/man2/open.2 b/man2/open.2
index f79330a17..70b2519d8 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 ()
-- 
2.40.1


                 reply	other threads:[~2023-05-19 13:16 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20230519131546.25232-1-alx@kernel.org \
    --to=alx.manpages@gmail.com \
    --cc=alx@kernel.org \
    --cc=fweimer@redhat.com \
    --cc=linux-man@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox