aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMauro Carvalho Chehab <m.chehab@samsung.com>2014-09-14 10:14:24 -0300
committerMauro Carvalho Chehab <m.chehab@samsung.com>2014-09-14 13:01:26 -0300
commit02c7915dbc4ab07e05a72575dc59789fcf10b373 (patch)
tree2931bf52054dac5b1bb2669b7ac2db6998205edc
parenta2c7b05cf8d7f0e526801f852b00572c54fe96aa (diff)
dvb-fe-tool: add support to open DVB FE in read only mode
This tool can be used to inspect the frontend. So, add support to open an already opened frontend. Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
-rw-r--r--utils/dvb/dvb-fe-tool.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/utils/dvb/dvb-fe-tool.c b/utils/dvb/dvb-fe-tool.c
index 5cf96490..6a19820d 100644
--- a/utils/dvb/dvb-fe-tool.c
+++ b/utils/dvb/dvb-fe-tool.c
@@ -98,6 +98,7 @@ static struct argp argp = {
int main(int argc, char *argv[])
{
struct dvb_v5_fe_parms *parms;
+ int fe_flags = O_RDWR;
argp_parse(&argp, argc, argv, 0, 0, 0);
@@ -108,7 +109,11 @@ int main(int argc, char *argv[])
if (!get && !delsys && !set_params)
verbose++;
- parms = dvb_fe_open(adapter, frontend, verbose, dvbv3);
+ if (!delsys && !set_params)
+ fe_flags = O_RDONLY;
+
+ parms = dvb_fe_open_flags(adapter, frontend, verbose, dvbv3,
+ NULL, fe_flags);
if (!parms)
return -1;

Privacy Policy