All of lore.kernel.org
 help / color / mirror / Atom feed
From: Max Filippov <jcmvbkbc@gmail.com>
To: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
Cc: buildroot <buildroot@buildroot.org>
Subject: Re: [Buildroot] package/coreutils mkfifo -m exit status
Date: Sun, 26 Dec 2021 23:24:53 -0800	[thread overview]
Message-ID: <CAMo8BfLjbpoWdTtoswpihCJJs3672bM5SBaLOA+5hjB_rXK0wA@mail.gmail.com> (raw)
In-Reply-To: <20211226122351.425d0579@windsurf>

Hi Thomas,

On Sun, Dec 26, 2021 at 3:23 AM Thomas Petazzoni
<thomas.petazzoni@bootlin.com> wrote:
> So, clearly dropping gl_cv_func_fstatat_zero_flag=no from Buildroot's
> coreutils.mk is the right thing to do.

Thanks for the confirmation, I've posted the patch.

> However, I have not been able to understand why
> gl_cv_func_fstatat_zero_flag=no makes fstatat() always return an error.
> The code in lib/fstatat.c is convoluted, and even looking at its Git
> history, I've not been able to spot what happened.

I had to look at the preprocessed source to understand it,
in the presence of gl_cv_func_fstatat_zero_flag=no it looks like this:

int rpl_fstatat(int fd, char const *file , struct stat *st, int flag)
{
 if (flag & ~0x100) {
(*__errno_location ())  =  22; return -1; };

i.e. return error with EINVAL code when flags have anything other
than AT_SYMLINK_NOFOLLOW, which is always the case for the
following call:
https://github.com/coreutils/gnulib/blob/9aca7b67333fd0a90bf56104325ce96199644451/lib/lchmod.c#L65

-- 
Thanks.
-- Max
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

  reply	other threads:[~2021-12-27  7:25 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-12-26  9:51 [Buildroot] package/coreutils mkfifo -m exit status Max Filippov
2021-12-26 11:23 ` Thomas Petazzoni
2021-12-27  7:24   ` Max Filippov [this message]
2021-12-27  8:54     ` Thomas Petazzoni

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=CAMo8BfLjbpoWdTtoswpihCJJs3672bM5SBaLOA+5hjB_rXK0wA@mail.gmail.com \
    --to=jcmvbkbc@gmail.com \
    --cc=buildroot@buildroot.org \
    --cc=thomas.petazzoni@bootlin.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.