summaryrefslogtreecommitdiff
path: root/vdr.c
diff options
context:
space:
mode:
authorKlaus Schmidinger <vdr@tvdr.de>2009-01-18 11:10:29 +0100
committerKlaus Schmidinger <vdr@tvdr.de>2009-01-18 11:10:29 +0100
commit3434f061b38c5d809a2fc6630e504cec2f0f093a (patch)
treeb7d36825a43064af0157deb1d60ce2406b349b99 /vdr.c
parent3def525dc45f52a5e50f29f0106fe16dcd1b85c9 (diff)
downloadvdr-3434f061b38c5d809a2fc6630e504cec2f0f093a.tar.gz
vdr-3434f061b38c5d809a2fc6630e504cec2f0f093a.tar.bz2
Implemented option '-i'
Diffstat (limited to 'vdr.c')
-rw-r--r--vdr.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/vdr.c b/vdr.c
index fa36b881..34ad856f 100644
--- a/vdr.c
+++ b/vdr.c
@@ -22,7 +22,7 @@
*
* The project's page is at http://www.cadsoft.de/vdr
*
- * $Id: vdr.c 2.3 2008/09/06 14:08:44 kls Exp $
+ * $Id: vdr.c 2.4 2009/01/18 11:02:37 kls Exp $
*/
#include <getopt.h>
@@ -223,6 +223,7 @@ int main(int argc, char *argv[])
{ "epgfile", required_argument, NULL, 'E' },
{ "grab", required_argument, NULL, 'g' },
{ "help", no_argument, NULL, 'h' },
+ { "instance", required_argument, NULL, 'i' },
{ "lib", required_argument, NULL, 'L' },
{ "lirc", optional_argument, NULL, 'l' | 0x100 },
{ "localedir",required_argument, NULL, 'l' | 0x200 },
@@ -245,7 +246,7 @@ int main(int argc, char *argv[])
};
int c;
- while ((c = getopt_long(argc, argv, "a:c:dD:E:g:hl:L:mp:P:r:s:t:u:v:Vw:", long_options, NULL)) != -1) {
+ while ((c = getopt_long(argc, argv, "a:c:dD:E:g:hi:l:L:mp:P:r:s:t:u:v:Vw:", long_options, NULL)) != -1) {
switch (c) {
case 'a': AudioCommand = optarg;
break;
@@ -268,6 +269,13 @@ int main(int argc, char *argv[])
break;
case 'h': DisplayHelp = true;
break;
+ case 'i': if (isnumber(optarg)) {
+ InstanceId = atoi(optarg);
+ if (InstanceId >= 0)
+ break;
+ }
+ fprintf(stderr, "vdr: invalid instance id: %s\n", optarg);
+ return 2;
case 'l': {
char *p = strchr(optarg, '.');
if (p)