Re: [PATCH] tools/nolibc: add support for openat(2)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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.





[Index of Archives]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Share Photos]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]

  Powered by Linux