Bug 14082 - readdir() can't always determine file type
Summary: readdir() can't always determine file type
Status: RESOLVED FIXED
Alias: None
Product: PolicyKit
Classification: Unclassified
Component: libpolkit (show other bugs)
Version: unspecified
Hardware: Other All
: medium normal
Assignee: David Zeuthen (not reading bugmail)
QA Contact: David Zeuthen (not reading bugmail)
URL:
Whiteboard:
Keywords:
: 13599 (view as bug list)
Depends on:
Blocks:
 
Reported: 2008-01-15 08:04 UTC by Martin Pitt
Modified: 2008-02-26 13:13 UTC (History)
1 user (show)

See Also:
i915 platform:
i915 features:


Attachments
fall back to stat() if readdir() can't detect type (3.15 KB, patch)
2008-01-15 08:04 UTC, Martin Pitt
Details | Splinter Review

Description Martin Pitt 2008-01-15 08:04:39 UTC
Created attachment 13726 [details] [review]
fall back to stat() if readdir() can't detect type

PK 0.7 does not work at all on my box. After some debugging I found out that readdir()'s result (d->d_type) is DT_UNKNOWN, i. e. it cannot determine the type of an entry.

I use various file systems for testing (reiserfs, xfs, ext3 ATM).

Attached patch fixes the issue by falling back to stat() on DT_UNKNOWN, so it's not a performance penalty on ext3.
Comment 1 David Zeuthen (not reading bugmail) 2008-02-26 13:08:07 UTC
I committed another patch for this

http://gitweb.freedesktop.org/?p=PolicyKit.git;a=commitdiff;h=0b59d3e7d4b282da308b362dc440b007b9ecedbf
Comment 2 David Zeuthen (not reading bugmail) 2008-02-26 13:13:10 UTC
*** Bug 13599 has been marked as a duplicate of this bug. ***


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.