[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CACWXhK=VXaMixrDTdo-ydgGw64vemu9kNUws5ef-91TFf-GPGg@mail.gmail.com>
Date: Thu, 9 Feb 2023 10:14:50 +0800
From: Feiyang Chen <chris.chenfeiyang@...il.com>
To: David Laight <David.Laight@...lab.com>
Cc: "w@....eu" <w@....eu>, "paulmck@...nel.org" <paulmck@...nel.org>,
Feiyang Chen <chenfeiyang@...ngson.cn>,
"arnd@...db.de" <arnd@...db.de>,
"chenhuacai@...nel.org" <chenhuacai@...nel.org>,
"jiaxun.yang@...goat.com" <jiaxun.yang@...goat.com>,
"loongarch@...ts.linux.dev" <loongarch@...ts.linux.dev>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH v2 2/5] tools/nolibc: Add statx() and make stat() rely on
statx() when available
On Thu, 9 Feb 2023 at 06:39, David Laight <David.Laight@...lab.com> wrote:
>
> From: chris.chenfeiyang@...il.com
> > Sent: 08 February 2023 10:18
> >
> > 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)
> > +{
> > + struct statx stat;
>
> If seems wrong that 'stat' has type 'struct statx'
> and 'buf' type 'struct stat *'.
>
> Maybe s/stat./statx./ and s/buf->/stat->/ ?
>
Hi, David,
Yes, it looks better to use 'struct statx statx'. Thank you!
I'd like to keep 'buf' to be consistent with the stat() below.
int stat(const char *path, struct stat *buf);
Thanks,
Feiyang
> David
>
> -
> Registered Address Lakeside, Bramley Road, Mount Farm, Milton Keynes, MK1 1PT, UK
> Registration No: 1397386 (Wales)
>
Powered by blists - more mailing lists