summaryrefslogtreecommitdiff
path: root/src/gsmd/gsmd.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/gsmd/gsmd.c')
-rw-r--r--src/gsmd/gsmd.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/gsmd/gsmd.c b/src/gsmd/gsmd.c
index 9389f5f..20daa7f 100644
--- a/src/gsmd/gsmd.c
+++ b/src/gsmd/gsmd.c
@@ -317,6 +317,7 @@ static struct option opts[] = {
{ "version", 0, NULL, 'V' },
{ "daemon", 0, NULL, 'd' },
{ "help", 0, NULL, 'h' },
+ { "instance", 1, NULL, 'i' },
{ "device", 1, NULL, 'p' },
{ "speed", 1, NULL, 's' },
{ "logfile", 1, NULL, 'l' },
@@ -347,6 +348,7 @@ static void print_usage(void)
"\t-V\t--version\tDisplay program version\n"
"\t-d\t--daemon\tDeamonize\n"
"\t-h\t--help\t\tDisplay this help message\n"
+ "\t-i\t--instance <0-255>\t\tInstance number to use\n"
"\t-p dev\t--device dev\tSpecify serial device to be used\n"
"\t-s spd\t--speed spd\tSpecify speed in bps (9600,38400,115200,...)\n"
"\t-F\t--hwflow\tHardware Flow Control (RTS/CTS)\n"
@@ -396,7 +398,7 @@ int main(int argc, char **argv)
print_header();
/*FIXME: parse commandline, set daemonize, device, ... */
- while ((argch = getopt_long(argc, argv, "FVLdhp:s:l:e:v:m:w:", opts, NULL)) != -1) {
+ while ((argch = getopt_long(argc, argv, "FVLdhi:p:s:l:e:v:m:w:", opts, NULL)) != -1) {
switch (argch) {
case 'V':
print_version();
@@ -416,6 +418,9 @@ int main(int argc, char **argv)
print_usage();
exit(0);
break;
+ case 'i':
+ g.instance = atoi(optarg);
+ break;
case 'p':
device = optarg;
break;
personal git repositories of Harald Welte. Your mileage may vary