public inbox for libc-alpha@sourceware.org
 help / color / mirror / Atom feed
From: Andreas Schwab <schwab@suse.de>
To: Florian Weimer via Libc-alpha <libc-alpha@sourceware.org>
Cc: Florian Weimer <fweimer@redhat.com>
Subject: Re: [PATCH] Linux: Do not skip d_ino == 0 entries in readdir, readdir64 (bug 12165)
Date: Mon, 19 Sep 2022 10:26:22 +0200	[thread overview]
Message-ID: <mvmy1ufrcr5.fsf@suse.de> (raw)
In-Reply-To: <87o7vbj1kz.fsf@oldenburg.str.redhat.com> (Florian Weimer via Libc-alpha's message of "Mon, 19 Sep 2022 08:54:52 +0200")

On Sep 19 2022, Florian Weimer via Libc-alpha wrote:

> -	  if (bytes <= 0)
> -	    {
> -	      /* On some systems getdents fails with ENOENT when the

Shouldn't that be "some file systems"?

> -		 open directory has been rmdir'd already.  POSIX.1
> -		 requires that we treat this condition like normal EOF.  */
> -	      if (bytes < 0 && errno == ENOENT)
> -		bytes = 0;
> -
> -	      /* Don't modifiy errno when reaching EOF.  */
> -	      if (bytes == 0)
> -		__set_errno (saved_errno);
> -	      dp = NULL;
> -	      break;
> -	    }
> -	  dirp->size = (size_t) bytes;
> -
> -	  /* Reset the offset into the buffer.  */
> -	  dirp->offset = 0;
> +	  /* Linux fails with ENOENT if IS_DEADDIR is true for the

What is IS_DEADDIR?

-- 
Andreas Schwab, SUSE Labs, schwab@suse.de
GPG Key fingerprint = 0196 BAD8 1CE9 1970 F4BE  1748 E4D4 88E3 0EEA B9D7
"And now for something completely different."

  reply	other threads:[~2022-09-19  8:26 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-09-19  6:54 Florian Weimer
2022-09-19  8:26 ` Andreas Schwab [this message]
2022-09-19  8:30   ` Florian Weimer
2022-09-19  8:53     ` Andreas Schwab
2022-09-19  9:30       ` Florian Weimer
2022-09-19  9:58         ` Andreas Schwab

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=mvmy1ufrcr5.fsf@suse.de \
    --to=schwab@suse.de \
    --cc=fweimer@redhat.com \
    --cc=libc-alpha@sourceware.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).