[PATCH v5 2/2] io: Use gnulib fts implementation (BZ 22944, BZ 20331)

Collin Funk collin.funk1@gmail.com
Fri Apr 10 18:59:10 GMT 2026


Collin Funk <collin.funk1@gmail.com> writes:

> It would be helpful to see if ftsent->fts_info before and after the
> change. I suspect it may have been returning FTS_D before and is now
> returning FTS_NS now. This would explain why it did not pick up
> hv_storvsc from under the scsi subdirectory.

Oops, I meant FTS_NSOK instead of FTS_NSOK. I think it would be safer
for dracut to do something like this since it is using FTS_NOSTAT:

    /* Get the file type if it could not be determined without stat.  */
    int info = fts_info;
    if (info == FTS_NSOK)
      {
        fts_set (fts, ent, FTS_AGAIN);
        fts_read (fts);
        info = ent->fts_info;
      }

I don't think it was ever safe to assume that fts_info would be set to
FTS_D (or another file type) when FTS_NOSTAT was used.

Collin


More information about the Libc-alpha mailing list