From 07aca97d83c52de1a5e0189cb5f7351ebe40185a Mon Sep 17 00:00:00 2001 From: erin_yueh Date: Fri, 18 Jan 2008 09:15:33 +0000 Subject: gsmd: add 'lgsm_open_n_get' to retrieve the current country code (Sean Chiang) git-svn-id: http://svn.openmoko.org/trunk/src/target/gsm@3876 99fdad57-331a-0410-800a-d7fa5415bdb3 --- src/util/shell.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/util') diff --git a/src/util/shell.c b/src/util/shell.c index f5f8fd3..e9aae1c 100644 --- a/src/util/shell.c +++ b/src/util/shell.c @@ -320,6 +320,7 @@ static int net_msghandler(struct lgsm_handle *lh, struct gsmd_msg_hdr *gmh) pending_responses --; break; case GSMD_NETWORK_OPER_GET: + case GSMD_NETWORK_OPER_N_GET: if (oper[0]) printf("Our current operator is %s\n", oper); else @@ -500,6 +501,7 @@ static void shell_help(void) "\tR\tRegister to given operator (R=number)\n" "\tU\tUnregister from netowrk\n" "\tP\tPrint current operator\n" + "\tN\tPrint current operator in numeric\n" "\tL\tList available operators\n" "\tQ\tRead signal quality\n" "\tS\tSleep (S[=second], default 5)\n" @@ -634,6 +636,10 @@ int shell_main(struct lgsm_handle *lgsmh, int sync) printf("Read current opername\n"); lgsm_oper_get(lgsmh); pending_responses ++; + } else if (!strcmp(buf, "N")) { + printf("Read current opername in numeric format\n"); + lgsm_oper_n_get(lgsmh); + pending_responses ++; } else if (!strcmp(buf, "L")) { printf("List operators\n"); lgsm_opers_get(lgsmh); -- cgit v1.2.3