public inbox for libc-alpha@sourceware.org
 help / color / mirror / Atom feed
From: Florian Weimer <fweimer@redhat.com>
To: Adhemerval Zanella via Libc-alpha <libc-alpha@sourceware.org>
Cc: Mateusz Guzik <mjguzik@gmail.com>,
	 Linus Torvalds <torvalds@linux-foundation.org>,
	 Adhemerval Zanella <adhemerval.zanella@linaro.org>
Subject: Re: [PATCH] io: Do not implement fstat with fstatat
Date: Wed, 06 Sep 2023 22:48:16 +0200	[thread overview]
Message-ID: <87ledjxc33.fsf@oldenburg.str.redhat.com> (raw)
In-Reply-To: <20230905203421.2127750-1-adhemerval.zanella@linaro.org> (Adhemerval Zanella via Libc-alpha's message of "Tue, 5 Sep 2023 17:34:21 -0300")

* Adhemerval Zanella via Libc-alpha:

> diff --git a/sysdeps/unix/sysv/linux/fstat64.c b/sysdeps/unix/sysv/linux/fstat64.c
> index 124384e57f..a7f4935a01 100644
> --- a/sysdeps/unix/sysv/linux/fstat64.c
> +++ b/sysdeps/unix/sysv/linux/fstat64.c

>  int
>  __fstat64_time64 (int fd, struct __stat64_t64 *buf)
>  {
> +#if !FSTATAT_USE_STATX
> +# if XSTAT_IS_XSTAT64
> +#  ifdef __NR_newfstatat
> +  /* 64-bit kABI, e.g. aarch64, ia64, powerpc64*, s390x, riscv64, and
> +     x86_64.  */
> +  return INLINE_SYSCALL_CALL (fstat, fd, buf);

It's a bit suspicious to check for __NR_newfstatat an then use fstat.
Could you add a comment to explain this?

Surprisingly it compiles on all architectures.

Thanks,
Florian


  parent reply	other threads:[~2023-09-06 20:48 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-09-05 20:34 Adhemerval Zanella
2023-09-05 20:48 ` Mateusz Guzik
2023-09-05 20:56   ` Adhemerval Zanella Netto
2023-09-05 21:03     ` Mateusz Guzik
2023-09-06 20:48 ` Florian Weimer [this message]
2023-09-11 13:11   ` Adhemerval Zanella Netto
2023-09-11 19:32     ` Linus Torvalds
2023-09-11 22:10       ` Adhemerval Zanella Netto
2023-09-12  5:31         ` Florian Weimer
2023-09-12 13:13           ` Adhemerval Zanella Netto

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87ledjxc33.fsf@oldenburg.str.redhat.com \
    --to=fweimer@redhat.com \
    --cc=adhemerval.zanella@linaro.org \
    --cc=libc-alpha@sourceware.org \
    --cc=mjguzik@gmail.com \
    --cc=torvalds@linux-foundation.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).