[vlc-devel] vlc_loaddir always falis on Mac OSX

Naohiro KORIYAMA nkoriyama at gmail.com
Tue Oct 11 10:40:03 CEST 2011


Sorry for posting so often,

2011/10/11 Naohiro KORIYAMA <nkoriyama at gmail.com>:
> 2011/10/11 Rémi Denis-Courmont <remi at remlab.net>:
>> On Tue, 11 Oct 2011 16:54:45 +0900, Naohiro KORIYAMA <nkoriyama at gmail.com>
>> wrote:
>>> following log is using function in vlc_readdir.c, set 0 to errno when
>>> fpathconf returns -1.
>>> If not set 0 to errno, errno is always 9 and go to error for the last
>> loop.
>>
>> Well, maybe. But the point is errno = EBADF means the file descriptor is
>> invalid. So it's perfectly normal for vlc_readdir() to fail. The bug must
>> be somewhere else.
>>
>
> Yes, the bug must be somewhere else or ,,,. but it exists no doubt on Mac.
> Everywhere using vlc_readdir(), fpathconf always renturns -1 and errno
> = EBADF(9).
>
> Here is full log from starting vlc and exiting vlc not only lua part.
> a little bit long and contains Japanese characters UTF-8.
> http://dl.dropbox.com/u/7574919/vlc_all.log
>

I wonder why only vlc_loaddir looks errno when vlc_readdir returns NULL.

I grep the whole and found the code that using vlc_readdir.

modules/access/dvb/scan.c|275 col 35| if( ! (psz_filename =
vlc_readdir( p_dir ) ) )
modules/gui/ncurses.c|287 col 21| while ((entry = vlc_readdir(current_dir))) {
modules/lua/libs/net.c|350 col 30| char *psz_filename = vlc_readdir( p_dir );
modules/misc/gnutls.c|417 col 25| char *ent = vlc_readdir (dir);
src/input/subtitles.c|319 col 28| while( (psz_name = vlc_readdir( dir
)) && i_sub_count < MAX_SUBTITLE_FILES )
src/modules/bank.c|393 col 22| char *file = vlc_readdir (dh), *relpath
= NULL, *abspath = NULL;
src/playlist/art.c|171 col 40| while( !b_found && (psz_filename =
vlc_readdir( p_dir )) )

These part of code are all not check the errno.

Just a reminder. I don't say that it's better to ignore the error.

-- 
KORIYAMA, Naohiro
nkoriyama at gmail.com



More information about the vlc-devel mailing list