[linux-dvb] [PATCH] dvbscan: -c shouldn't override earlier -o

Darren Salt linux at youmustbejoking.demon.co.uk
Mon Oct 24 01:36:50 CEST 2005


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.
-------------- next part --------------
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;


More information about the linux-dvb mailing list