lkml.org 
[lkml]   [2023]   [Feb]   [8]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v2 2/5] tools/nolibc: Add statx() and make stat() rely on statx() when available
On Wed, Feb 8, 2023, at 11:17, chris.chenfeiyang@gmail.com wrote:
> From: Feiyang Chen <chenfeiyang@loongson.cn>
>
> 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.

Arnd

\
 
 \ /
  Last update: 2023-03-27 00:14    [W:0.218 / U:0.156 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site