[linux-dvb] return value when FE_GET_FRONTEND fails?

Trent Piepho xyzzy at speakeasy.org
Tue Apr 4 21:04:50 CEST 2006


I've written initial support (what I can without a datasheet) for the
FE_GET_FRONTEND ioctl for the or51132 frontend, but I'm not sure what value to
return on errors.

I read the current modulation from the chip, but this could fail (i2c error,
unknown value returned, etc).

The API doesn't cover what to do if the frontend status can't be read, and
current frontend drivers are inconsistent.

cx22700 and cx22702 return EAGAIN on error.  cx24123 and mt312 return
EREMOTEIO.  mt352 returns EINVAL.  dib3000mb, dib3000mc, and l64781 return 0
on an error.  The rest of the frontends either:

A) Have no error conditions.
B) Don't check for errors or unexpected data from the hardware, usually
   leaving some parameters uninitialized or with garbage values if an
   error were to occur.
C) Check for errors, but don't abort the ioctl or return a failure code.



More information about the linux-dvb mailing list