[MPlayer-dev-eng] Re: [PATCH] osd menu fielsel.c

Daniel Pittman daniel at rimspace.net
Thu Nov 21 11:56:22 CET 2002


On Thu, 21 Nov 2002, lgb at lgb.hu wrote:
> On Thu, Nov 21, 2002 at 09:17:06PM +1100, Daniel Pittman wrote:
>> On Thu, 21 Nov 2002, BjXrn Sandell wrote:

[...]

>> >> And what is the use of this d_type thing instead of stat ?

[...]

> Yes, for readdir():
> 
> man readdir
> [...]
> BUGS
>        Field d_type is not implemented as of libc6 2.1 and will always
>        return DT_UNKNOWN (0).
> 
> You should stat the file to get this information, AFAIK ...

I don't know of any platform that returns *wrong* information in the
type field. So, to find out the type of something, test if the field is
DT_UNKNOWN and stat if you have to.

           Daniel

-- 
There is nothing men more readily give themselves to than pushing their own
beliefs. When ordinary means fail, they add commandment, violence, fire and
sword.
        -- Michel Eyquem de Montaigne, _Essays_, Book. I, Ch. 39 (1580)



More information about the MPlayer-dev-eng mailing list