diff options
author | Florian Boor <florian.boor@kernelconcepts.de> | 2007-06-12 14:45:27 +0000 |
---|---|---|
committer | Florian Boor <florian.boor@kernelconcepts.de> | 2007-06-12 14:45:27 +0000 |
commit | b1f4d34f8541f039d72d423223c91e32540a2fc5 (patch) | |
tree | c50f34a595a58cb31a25d96727c3e2c9c27c0a91 /packages/gsm/files/getopt-wait-interpreter-ready.patch | |
parent | 10013e9ed4e79a2f6ca0ceb6451787aaa47c46e5 (diff) | |
parent | b655c71aac44af6eab2a52774ea810a945592cee (diff) |
merge of '30c320b2f51c86226580e5bbf68fa8b0896a0655'
and '8dfee9b2427785432e4161eb7cc749155230e08e'
Diffstat (limited to 'packages/gsm/files/getopt-wait-interpreter-ready.patch')
-rw-r--r-- | packages/gsm/files/getopt-wait-interpreter-ready.patch | 57 |
1 files changed, 57 insertions, 0 deletions
diff --git a/packages/gsm/files/getopt-wait-interpreter-ready.patch b/packages/gsm/files/getopt-wait-interpreter-ready.patch new file mode 100644 index 0000000000..52b0da1183 --- /dev/null +++ b/packages/gsm/files/getopt-wait-interpreter-ready.patch @@ -0,0 +1,57 @@ +Index: gsm/src/gsmd/gsmd.c +=================================================================== +--- gsm.orig/src/gsmd/gsmd.c 2007-06-03 11:57:43.000000000 +0200 ++++ gsm/src/gsmd/gsmd.c 2007-06-03 11:57:45.000000000 +0200 +@@ -311,6 +311,7 @@ + { "leak-report", 0, NULL, 'L' }, + { "vendor", 1, NULL, 'v' }, + { "machine", 1, NULL, 'm' }, ++ { "wait", 1, NULL, 'w' }, + { 0, 0, 0, 0 } + }; + +@@ -333,6 +334,7 @@ + "\t-l file\t--logfile file\tSpecify a logfile to log to\n" + "\t-v\t--vendor v\tSpecify GSM modem vendor plugin\n" + "\t-m\t--machine m\tSpecify GSM modem machine plugin\n" ++ "\t-w\t--wait m\tWait for the AT Interpreter Ready message\n" + ); + } + +@@ -362,6 +364,7 @@ + char *logfile = "syslog"; + char *vendor_name = NULL; + char *machine_name = NULL; ++ int wait = -1; + + signal(SIGTERM, sig_handler); + signal(SIGINT, sig_handler); +@@ -374,7 +377,7 @@ + print_header(); + + /*FIXME: parse commandline, set daemonize, device, ... */ +- while ((argch = getopt_long(argc, argv, "FVLdhp:s:l:v:m:", opts, NULL)) != -1) { ++ while ((argch = getopt_long(argc, argv, "FVLdhp:s:l:v:m:w:", opts, NULL)) != -1) { + switch (argch) { + case 'V': + /* FIXME */ +@@ -411,6 +414,9 @@ + case 'm': + machine_name = optarg; + break; ++ case 'w': ++ wait = atoi(optarg); ++ break; + } + } + +@@ -455,6 +461,9 @@ + exit(1); + } + ++ if (wait >= 0) ++ g.interpreter_ready = !wait; ++ + if (atcmd_init(&g, fd) < 0) { + fprintf(stderr, "can't initialize UART device\n"); + exit(1); |