I am not convinced that the poll method is better. When I switched from GCC 2.95 to GCC 3.2 I found that dvbtune stopped being able to read PSI tables. This code:
struct pollfd ufd;
** SNIP **
fd_pat = open(demuxdev[card],O_RDWR|O_NONBLOCK)
** SNIP **
ufd.fd=fd_pat; ufd.events=POLLPRI; if (poll(&ufd,1,2000) < 0) { fprintf(stderr,"TIMEOUT reading from fd_pat\n"); close(fd_pat); return; } if (read(fd_pat,buf,3)==3) { ** SNIP **
You don't distinguish between read() returning success (> 0) or error (-1). You also don't check ufd.revents. Please read the manual pages for poll() and read() thoroughly.
} else { fprintf(stderr,"Nothing to read from fd_pat\n");
For the DVB driver read() can never return 0 (meaning end-of-file). There must be something wrong with your system libraries or compiler.
}Odd.
Always returns "Nothing to read from fd_pat" when compiled on my system with GCC 3.2 but the binary compiled with GCC 2.95 works perfectly on the same system. The error returned was always "Resource temporarily unavailable".
Johannes
-- Info: To unsubscribe send a mail to [EMAIL PROTECTED] with "unsubscribe linux-dvb" as subject.
