unofficial mirror of libc-alpha@sourceware.org
 help / color / mirror / Atom feed
From: Paul Eggert <eggert@cs.ucla.edu>
To: DJ Delorie <dj@redhat.com>
Cc: libc-alpha@sourceware.org
Subject: Re: glob vs '*/' vs GLOB_ONLYDIR vs xfs
Date: Fri, 6 Aug 2021 14:47:50 -0700	[thread overview]
Message-ID: <aa3f7b11-7aaf-d986-f92c-516811c10cf7@cs.ucla.edu> (raw)
In-Reply-To: <xnv94joj9f.fsf@greed.delorie.com>

On 8/5/21 11:10 AM, DJ Delorie wrote:
> Paul Eggert <eggert@cs.ucla.edu> writes:
>> Isn't that a bug in XFS? readdir should set d_type to DT_UNKNOWN if it
>> doesn't know the type. It shouldn't set d_type to garbage.
> 
> XFS sets d_type to DT_UNKNOWN for most entries, not garbage.

Ah, sorry, I misunderstood your previous email.

>> Doesn't glob do the right thing if d_type is DT_UNKNOWN?
> 
> No, if by "right thing" you mean "call lstat and find out the right
> type".

Thanks for reporting the problem. I plan to address this by merging 
recent glibc glob changes into Gnulib (these were for 64-bit time_t), 
fixing the bug in Gnulib, and then we can talk about merging back.

The fix won't be trivial, unfortunately. On the bright side, I think we 
can remove some more stat/lstat calls from glob.

  reply	other threads:[~2021-08-06 21:48 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-08-05  3:24 glob vs '*/' vs GLOB_ONLYDIR vs xfs DJ Delorie via Libc-alpha
2021-08-05  8:10 ` Paul Eggert
2021-08-05 18:10   ` DJ Delorie via Libc-alpha
2021-08-06 21:47     ` Paul Eggert [this message]
2021-08-06 22:03       ` DJ Delorie via Libc-alpha

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

  List information: https://www.gnu.org/software/libc/involved.html

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

  git send-email \
    --in-reply-to=aa3f7b11-7aaf-d986-f92c-516811c10cf7@cs.ucla.edu \
    --to=eggert@cs.ucla.edu \
    --cc=dj@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).