FreeCalypso > hg > freecalypso-sw
comparison rvinterf/lowlevel/rvifmain.c @ 187:f5f8776f7c66
rvinterf: added -s option for changing the local socket pathname
author | Michael Spacefalcon <msokolov@ivan.Harhan.ORG> |
---|---|
date | Sun, 24 Nov 2013 23:25:59 +0000 |
parents | ebfa9657d03d |
children | cf8583923dc4 |
comparison
equal
deleted
inserted
replaced
186:faa31a47f102 | 187:f5f8776f7c66 |
---|---|
25 FILE *logF; | 25 FILE *logF; |
26 time_t logtime; | 26 time_t logtime; |
27 int background; | 27 int background; |
28 int max_fd; | 28 int max_fd; |
29 | 29 |
30 char *socket_pathname = "/tmp/rvinterf_socket"; | |
31 | |
30 main(argc, argv) | 32 main(argc, argv) |
31 char **argv; | 33 char **argv; |
32 { | 34 { |
33 extern char *optarg; | 35 extern char *optarg; |
34 extern int optind; | 36 extern int optind; |
35 int c; | 37 int c; |
36 fd_set fds; | 38 fd_set fds; |
37 struct client *cli, **clip; | 39 struct client *cli, **clip; |
38 | 40 |
39 while ((c = getopt(argc, argv, "bB:d:l:")) != EOF) | 41 while ((c = getopt(argc, argv, "bB:d:l:s:")) != EOF) |
40 switch (c) { | 42 switch (c) { |
41 case 'b': | 43 case 'b': |
42 background++; | 44 background++; |
43 continue; | 45 continue; |
44 case 'B': | 46 case 'B': |
47 case 'd': | 49 case 'd': |
48 target_fd = atoi(optarg); | 50 target_fd = atoi(optarg); |
49 continue; | 51 continue; |
50 case 'l': | 52 case 'l': |
51 logfname = optarg; | 53 logfname = optarg; |
54 continue; | |
55 case 's': | |
56 socket_pathname = optarg; | |
52 continue; | 57 continue; |
53 case '?': | 58 case '?': |
54 default: | 59 default: |
55 usage: fprintf(stderr, | 60 usage: fprintf(stderr, |
56 "usage: %s [options] ttyport\n", argv[0]); | 61 "usage: %s [options] ttyport\n", argv[0]); |