From: "Louis Taylor" <louis@kragniz.eu>
To: "Louis Taylor" <louis@kragniz.eu>,
"Thomas Weißschuh" <linux@weissschuh.net>
Cc: "Willy Tarreau" <w@1wt.eu>, "Shuah Khan" <shuah@kernel.org>,
<linux-kernel@vger.kernel.org>, <linux-kselftest@vger.kernel.org>
Subject: Re: [PATCH] tools/nolibc: add support for openat(2)
Date: Mon, 03 Mar 2025 09:20:24 +0000 [thread overview]
Message-ID: <D86IQDQZRN67.95DLK0YYQE1A@kragniz.eu> (raw)
In-Reply-To: <D86I2TBQIPLZ.TCUUJWWM5DMO@kragniz.eu>
On Mon Mar 3, 2025 at 8:49 AM GMT, Louis Taylor wrote:
> > > +}
> > > +
> > > +static __attribute__((unused))
> > > +int openat(int dirfd, const char *path, int flags, ...)
> > > +{
> > > + mode_t mode = 0;
> > > +
> > > + if (flags & O_CREAT) {
> > > + va_list args;
> > > +
> > > + va_start(args, flags);
> > > + mode = va_arg(args, int);
> >
> > mode_t instead of int?
>
> This implementation is yoinked directly from open() below. I have no
> opinions, but if it should be changed it should be changed in both
> functions.
Actually, maybe this openat function could just entirely drop the
varargs since compatibility is less of an issue, effectively going back
to the interface before a7604ba149e7 (tools/nolibc/sys: make open() take
a vararg on the 3rd argument, 2022-02-07) rather than copying the
current state.
prev parent reply other threads:[~2025-03-03 9:20 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-03-02 20:25 Louis Taylor
2025-03-02 22:24 ` Thomas Weißschuh
2025-03-03 8:49 ` Louis Taylor
2025-03-03 9:20 ` Louis Taylor [this message]
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=D86IQDQZRN67.95DLK0YYQE1A@kragniz.eu \
--to=louis@kragniz.eu \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-kselftest@vger.kernel.org \
--cc=linux@weissschuh.net \
--cc=shuah@kernel.org \
--cc=w@1wt.eu \
/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
all inboxes | Powered by JetHome®