summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authortick <tick@99fdad57-331a-0410-800a-d7fa5415bdb3>2007-11-12 09:41:54 +0000
committertick <tick@99fdad57-331a-0410-800a-d7fa5415bdb3>2007-11-12 09:41:54 +0000
commit5cd3cb1f9209e6dbdf19c02417e87791b8349a5c (patch)
tree16e182c64d0a4bfcd24a0f02fafe2a167459f69b /src
parent687b3d7ae106632a1d9446fcd1f49e3d28dd5793 (diff)
gsmd: adding sleep mode into libgsmd-tool shell mode(Tick)
git-svn-id: http://svn.openmoko.org/trunk/src/target/gsm@3393 99fdad57-331a-0410-800a-d7fa5415bdb3
Diffstat (limited to 'src')
-rw-r--r--src/util/shell.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/util/shell.c b/src/util/shell.c
index 0e77c44..4f133d3 100644
--- a/src/util/shell.c
+++ b/src/util/shell.c
@@ -346,6 +346,7 @@ static int shell_help(void)
"\tP\tPrint current operator\n"
"\tL\tDetect available operators\n"
"\tQ\tRead signal quality\n"
+ "\tS\tSleep (S[=second], default 5)\n"
"\tT\tSend DTMF Tone\n"
"\tn\tPrint subscriber numbers\n"
"\tpd\tPB Delete (pb=index)\n"
@@ -473,6 +474,14 @@ int shell_main(struct lgsm_handle *lgsmh)
lgsm_signal_quality(lgsmh);
} else if (!strcmp(buf, "q")) {
exit(0);
+ } else if (buf[0] == 'S' ) {
+ if(!strchr(buf,'=') || atoi((strchr(buf,'=')+1)) < 0) {
+ printf("Sleep 5 secs\n");
+ sleep(5);
+ }else {
+ printf("Sleep %d secs\n",atoi(strchr(buf,'=')+1));
+ sleep(atoi(strchr(buf,'=')+1));
+ }
} else if (buf[0] == 'T') {
if (strlen(buf) < 2)
continue;
personal git repositories of Harald Welte. Your mileage may vary