dvb-fe: Add a flag to indicate if DVBv5 stats is in use
authorMauro Carvalho Chehab <mchehab@redhat.com>
Sat, 19 Jan 2013 09:25:13 +0000 (07:25 -0200)
committerMauro Carvalho Chehab <mchehab@redhat.com>
Wed, 23 Jan 2013 21:18:08 +0000 (19:18 -0200)
commitc82c2671ac6c9e6b8eeac139cb899984c9482335
tree070b29fb24040a11436bdf38b32a0111567e3817
parentd53542e19ef23f2b6842a020e66c935bfdbf0074
dvb-fe: Add a flag to indicate if DVBv5 stats is in use

Instead of trying every time to see if DVBv5 stats are available,
if version is equal or upper than 5.10, a call to FE_GET_PROPERTY
will fail only if a more permanent error happened (EFAULT, ENOMEM,
and similar errors).

A successful call to FE_GET_PROPERTY that returns all stat props
with len=0 means that the frontend doesn't implement any DVBv5
stats. So, if it fails once, it can be assumed that there's no
DVBv5 stats implemented for that frontend.

As a bonus, the logic now knows exactly if a measure came from
DVBv3 or from DVBv5 API.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
lib/include/dvb-fe.h
lib/libdvbv5/dvb-fe.c