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.