Mailing List archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[linux-dvb] Tzap and help -h -?



Hello

Szap shows usage help with -? and -h. Tzap doesn't show help for all options. 
Here's the patch (from szap.c) that shows usage help for all options.

Regards
Kimmo Koivisto
Index: tzap.c
===================================================================
RCS file: /cvs/linuxtv/dvb-apps/util/szap/tzap.c,v
retrieving revision 1.8
diff -u -r1.8 tzap.c
--- tzap.c	21 Nov 2004 17:17:11 -0000	1.8
+++ tzap.c	21 Nov 2004 17:46:49 -0000
@@ -476,8 +476,21 @@
 	}
 }
 
-static const char *usage = "\nusage: %s [-a adapter_num] [-f frontend_id] [-d demux_id] \\\n"
-	"\t[-c conf_file] [-t timeout_secs] [-r] [-o mpeg_file] [-x] [-s] [-S] <channel name>\n\n";
+static char *usage =
+    "\nusage:\n"
+    "       tzap [options] <channel_name>\n"
+    "         zap to channel channel_name (case insensitive)\n"
+    "     -a number : use given adapter (default 0)\n"
+    "     -f number : use given frontend (default 0)\n"
+    "     -d number : use given demux (default 0)\n"
+    "     -c file   : read channels list from 'file'\n"
+    "     -x        : exit after tuning\n"
+    "     -r        : set up /dev/dvb/adapterX/dvr0 for TS recording\n"
+    "     -s        : only print summary\n"
+    "     -S        : run silently (no output)\n"
+    "     -t number : timeout (seconds)\n"
+    "     -o file   : output filename (use -o - for stdout)\n"
+    "     -h -?     : display this help and exit\n";
 
 
 int main(int argc, char **argv)
@@ -493,7 +506,7 @@
 	int record=0;
 	char *filename = NULL;
 
-	while ((opt = getopt(argc, argv, "hrxRsSn:a:f:d:c:t:o:")) != -1) {
+	while ((opt = getopt(argc, argv, "?hrxRsSn:a:f:d:c:t:o:")) != -1) {
 		switch (opt) {
 		case 'a':
 			adapter = strtoul(optarg, NULL, 0);

Home | Main Index | Thread Index