Re: [PATCH v2 2/5] tools/nolibc: Add statx() and make stat() rely on statx() when available
From: Feiyang Chen
Date: Wed Feb 08 2023 - 21:06:49 EST
On Wed, 8 Feb 2023 at 18:39, Arnd Bergmann <arnd@xxxxxxxx> wrote:
>
> On Wed, Feb 8, 2023, at 11:17, chris.chenfeiyang@xxxxxxxxx wrote:
> > From: Feiyang Chen <chenfeiyang@xxxxxxxxxxx>
> >
> > loongarch and riscv32 only have statx(). arc, hexagon, nios2 and
> > openrisc have statx() and stat64() but not stat() or newstat().
> > Add statx() and make stat() rely on statx() to make them happy.
>
> > +#ifdef __NR_statx
> > +static __attribute__((unused))
> > +int sys_stat(const char *path, struct stat *buf)
> > +{
>
> The actual #ifdef check here does what I had suggested first, using
> statx() for all architectures, rather than what you describe in the
> changelog. I think you should keep the check from the first version,
> testing for __NR_stat/__NR_newfstatat and keep the changelog text
> here. Also please add something about the possibility of using statx()
> everywhere in the future.
>
Hi, Arnd,
OK, I will keep the check from the first version and mention that we
may use statx() everywhere.
Thanks,
Feiyang
> Arnd