FreeCalypso > hg > freecalypso-sw
diff rvinterf/etm/main.c @ 200:2847b6cbd915
fc-tmsh rvinterf invokation mode: support passing -B as well
author | Michael Spacefalcon <msokolov@ivan.Harhan.ORG> |
---|---|
date | Thu, 19 Dec 2013 08:15:47 +0000 |
parents | fa7174faa9aa |
children |
line wrap: on
line diff
--- a/rvinterf/etm/main.c Thu Dec 19 08:06:06 2013 +0000 +++ b/rvinterf/etm/main.c Thu Dec 19 08:15:47 2013 +0000 @@ -13,17 +13,21 @@ int sock; -extern char *rvinterf_lopt, *rvinterf_wopt; +extern char *rvinterf_Bopt, *rvinterf_lopt, *rvinterf_wopt; main(argc, argv) char **argv; { + extern int optind; extern char *optarg; int c; fd_set fds; - while ((c = getopt(argc, argv, "dl:s:w:")) != EOF) + while ((c = getopt(argc, argv, "B:dl:s:w:")) != EOF) switch (c) { + case 'B': + rvinterf_Bopt = optarg; + continue; case 'd': dflag++; continue; @@ -44,9 +48,9 @@ } switch (argc - optind) { case 0: - if (rvinterf_lopt || rvinterf_wopt) { + if (rvinterf_Bopt || rvinterf_lopt || rvinterf_wopt) { fprintf(stderr, - "%s: -l and -w options are meaningful only when launching rvinterf\n", + "%s: -B, -l and -w options are meaningful only when launching rvinterf\n", argv[0]); exit(1); }