diff options
author | Mauro Carvalho Chehab <mchehab+huawei@kernel.org> | 2021-02-23 14:51:07 +0100 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab+huawei@kernel.org> | 2021-02-23 14:51:07 +0100 |
commit | a8c4bbbbbe2a4154ce307aba34884854a3cd030a (patch) | |
tree | c55b256ce1500293eecc4677f81b15b61d3280ac | |
parent | 233860e8e687f02d8a721ed8c974219996823fd0 (diff) | |
download | v4l-utils-a8c4bbbbbe2a4154ce307aba34884854a3cd030a.tar.gz |
dvbv5-zap: add a check for dvb_fe_retrieve_status() errors
If something goes wrong, just sleep and re-try inside the
timeout loop.
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
-rw-r--r-- | utils/dvb/dvbv5-zap.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/utils/dvb/dvbv5-zap.c b/utils/dvb/dvbv5-zap.c index 534025bd..aab2daf8 100644 --- a/utils/dvb/dvbv5-zap.c +++ b/utils/dvb/dvbv5-zap.c @@ -501,6 +501,11 @@ static int check_frontend(struct arguments *args, status = 0; rc = dvb_fe_retrieve_stats(parms, DTV_STATUS, &status); + if (rc) { + ERROR("dvb_fe_retrieve_stats failed"); + usleep(1000000); + continue; + } if (!args->silent) print_frontend_stats(stderr, args, parms); if (status & FE_HAS_LOCK) |