From 7fda58922167e78d1db5af3da6fbdacbb7f3790f Mon Sep 17 00:00:00 2001 From: laforge Date: Wed, 28 Feb 2007 11:55:34 +0000 Subject: revert 'bug108' patch from tony guan. git-svn-id: http://svn.openmoko.org/trunk/src/target/gsm@1161 99fdad57-331a-0410-800a-d7fa5415bdb3 --- src/util/libgsmd-tool.c | 3 --- src/util/shell.c | 63 +------------------------------------------------ 2 files changed, 1 insertion(+), 65 deletions(-) (limited to 'src/util') diff --git a/src/util/libgsmd-tool.c b/src/util/libgsmd-tool.c index 34bb53c..c48bf8e 100644 --- a/src/util/libgsmd-tool.c +++ b/src/util/libgsmd-tool.c @@ -95,14 +95,11 @@ int main(int argc, char **argv) printf("libgsm-tool - (C) 2006 by Harald Welte\n" "This program is Free Software and has ABSOLUTELY NO WARRANTY\n\n"); - while (1) { int c, option_index = 0; c = getopt_long(argc, argv, "vVhm:p:", opts, &option_index); if (c == -1) - { break; - } switch (c) { case 'v': diff --git a/src/util/shell.c b/src/util/shell.c index c7ccc91..43a0bfe 100644 --- a/src/util/shell.c +++ b/src/util/shell.c @@ -48,7 +48,6 @@ static int shell_help(void) "\to\tPower Off\n" "\tR\tRegister Netowrk\n" "\tT\tSend DTMF Tone\n" - "\tI\tDevice Infor\n" "\tq\tQuit\n" ); } @@ -59,7 +58,6 @@ int shell_main(struct lgsm_handle *lgsmh) char buf[STDIN_BUF_SIZE+1]; char rbuf[STDIN_BUF_SIZE+1]; int rlen = sizeof(rbuf); - fd_set readset; lgsm_register_handler(lgsmh, GSMD_MSG_PASSTHROUGH, &pt_msghandler); @@ -138,68 +136,9 @@ int shell_main(struct lgsm_handle *lgsmh) continue; printf("DTMF: %c\n", buf[1]); lgsm_voice_dtmf(lgsmh, buf[1]); - } else if (buf[0] == 'I') { - //FIXME: sometimes, lgsm_get_info returns directly, and sometimes the result just gets lost. - static int infoindex=LGSM_INFO_TYPE_NONE;//information - infoindex=infoindex%LGSM_INFO_TYPE_IMSI+1; - rlen = sizeof(rbuf); - switch(infoindex){ - case LGSM_INFO_TYPE_MANUF: - - if(lgsm_get_info(lgsmh,LGSM_INFO_TYPE_MANUF,rbuf,&rlen)) - { - printf("manufacturer:%s\n",rbuf); - } - else - printf("manufacturer information error!\n"); - break; - - case LGSM_INFO_TYPE_MODEL: - if(lgsm_get_info(lgsmh,LGSM_INFO_TYPE_MODEL,rbuf,&rlen)) - { - printf("model:%s\n",rbuf); - } - else - printf("model error!\n"); - break; - - case LGSM_INFO_TYPE_REVISION: - if(lgsm_get_info(lgsmh,LGSM_INFO_TYPE_REVISION,rbuf,&rlen)) - { - printf("revision:%s\n",rbuf); - } - else - printf("revision information error!\n"); - break; - - case LGSM_INFO_TYPE_IMSI: - if(lgsm_get_info(lgsmh,LGSM_INFO_TYPE_IMSI,rbuf,&rlen)) - { - printf("imei:%s\n",rbuf); - } - else - printf("imei information error!\n"); - break; - case LGSM_INFO_TYPE_SERIAL: - if(lgsm_get_info(lgsmh,LGSM_INFO_TYPE_SERIAL,rbuf,&rlen)) - { - printf("sn:%s\n",rbuf); - } - else - printf("sn information error!\n"); - break; - default: - printf("something is wrong!\n"); - } - - - - } - else { + } else { printf("Unknown command `%s'\n", buf); } } } } - - -- cgit v1.2.3