diff options
author | Klaus Schmidinger <vdr@tvdr.de> | 2002-03-29 10:10:04 +0100 |
---|---|---|
committer | Klaus Schmidinger <vdr@tvdr.de> | 2002-03-29 10:10:04 +0100 |
commit | 2625c46232837afc8ec52fdeb0ad79ac0f60bc4c (patch) | |
tree | 037cf20a7d30c3d0439ebac0a530d309bcc2e4c3 /vdr.c | |
parent | ce5a52c9065f1e12f5ca924c98688fdf17cc3f5e (diff) | |
download | vdr-2625c46232837afc8ec52fdeb0ad79ac0f60bc4c.tar.gz vdr-2625c46232837afc8ec52fdeb0ad79ac0f60bc4c.tar.bz2 |
Added command line option -V
Diffstat (limited to 'vdr.c')
-rw-r--r-- | vdr.c | 11 |
1 files changed, 8 insertions, 3 deletions
@@ -22,7 +22,7 @@ * * The project's page is at http://www.cadsoft.de/people/kls/vdr * - * $Id: vdr.c 1.101 2002/03/09 17:10:16 kls Exp $ + * $Id: vdr.c 1.102 2002/03/29 10:09:20 kls Exp $ */ #include <getopt.h> @@ -101,6 +101,7 @@ int main(int argc, char *argv[]) { "record", required_argument, NULL, 'r' }, { "shutdown", required_argument, NULL, 's' }, { "terminal", required_argument, NULL, 't' }, + { "version", no_argument, NULL, 'V' }, { "video", required_argument, NULL, 'v' }, { "watchdog", required_argument, NULL, 'w' }, { NULL } @@ -108,7 +109,7 @@ int main(int argc, char *argv[]) int c; int option_index = 0; - while ((c = getopt_long(argc, argv, "a:c:dD:E:hl:mp:r:s:t:v:w:", long_options, &option_index)) != -1) { + while ((c = getopt_long(argc, argv, "a:c:dD:E:hl:mp:r:s:t:v:Vw:", long_options, &option_index)) != -1) { switch (c) { case 'a': cDvbApi::SetAudioCommand(optarg); break; @@ -139,7 +140,7 @@ int main(int argc, char *argv[]) " %s); use '-E-' to disable this\n" " if FILE is a directory, the default EPG file will be\n" " created in that directory\n" - " -h, --help display this help and exit\n" + " -h, --help print this help and exit\n" " -l LEVEL, --log=LEVEL set log level (default: 3)\n" " 0 = no logging, 1 = errors only,\n" " 2 = errors and info, 3 = errors, info and debug\n" @@ -149,6 +150,7 @@ int main(int argc, char *argv[]) " -r CMD, --record=CMD call CMD before and after a recording\n" " -s CMD, --shutdown=CMD call CMD to shutdown the computer\n" " -t TTY, --terminal=TTY controlling tty\n" + " -V, --version print version information and exit\n" " -v DIR, --video=DIR use DIR as video directory (default: %s)\n" " -w SEC, --watchdog=SEC activate the watchdog timer with a timeout of SEC\n" " seconds (default: %d); '0' disables the watchdog\n" @@ -186,6 +188,9 @@ int main(int argc, char *argv[]) break; case 't': Terminal = optarg; break; + case 'V': printf("vdr, version %s\n", VDRVERSION); + return 0; + break; case 'v': VideoDirectory = optarg; while (optarg && *optarg && optarg[strlen(optarg) - 1] == '/') optarg[strlen(optarg) - 1] = 0; |