[linux-dvb] [PATCH] dvbscan: -c shouldn't override earlier -o
Johannes Stezenbach
js at linuxtv.org
Thu Oct 27 23:29:19 CEST 2005
On Mon, Oct 24, 2005 at 12:36:50AM +0100, Darren Salt wrote:
> The attached patch stops dvbscan's -c option from overriding an earlier -o.
> (Either this should be applied or the --help text should be updated to say
> that -c overrides -o.)
>
> --
> | Darren Salt | nr. Ashington, | RISC OS,
> | ds at youmustbejoking.demon.co.uk | Northumberland | Linux
> | ds at zap.tartarus.org | *Toon Army* |
> | Let's keep the pound sterling
>
> It won't work.
"It won't work" is what I am thinking. -c implies that no NIT
is parsed, thus only OUTPUT_PIDS makes sense.
Or am I wrong on this? I don't have time to actually try it
myself now, if someone confirms this patch works I will commit it.
Thanks,
Johannes
> Index: util/scan/scan.c
> ===================================================================
> RCS file: /cvs/linuxtv/dvb-apps/util/scan/scan.c,v
> retrieving revision 1.20
> diff -u -r1.20 scan.c
> --- util/scan/scan.c 23 Oct 2005 22:54:04 -0000 1.20
> +++ util/scan/scan.c 23 Oct 2005 23:31:47 -0000
> @@ -82,6 +82,7 @@
> OUTPUT_PIDS
> };
> static enum format output_format = OUTPUT_ZAP;
> +static int output_format_set = 0;
>
>
> enum polarisation {
> @@ -2120,7 +2121,8 @@
> break;
> case 'c':
> current_tp_only = 1;
> - output_format = OUTPUT_PIDS;
> + if (!output_format_set)
> + output_format = OUTPUT_PIDS;
> break;
> case 'n':
> get_other_nits = 1;
> @@ -2145,6 +2147,7 @@
> bad_usage(argv[0], 0);
> return -1;
> }
> + output_format_set = 1;
> break;
> case '5':
> long_timeout = 1;
> _______________________________________________
> linux-dvb mailing list
> linux-dvb at linuxtv.org
> http://www.linuxtv.org/cgi-bin/mailman/listinfo/linux-dvb
More information about the linux-dvb
mailing list