r3647 - in trunk/src/target/gsm: include/gsmd src/gsmd src/libgsmd

erin_yueh at sita.openmoko.org erin_yueh at sita.openmoko.org
Thu Dec 13 03:56:02 CET 2007


Author: erin_yueh
Date: 2007-12-13 03:55:54 +0100 (Thu, 13 Dec 2007)
New Revision: 3647

Modified:
   trunk/src/target/gsm/include/gsmd/event.h
   trunk/src/target/gsm/src/gsmd/usock.c
   trunk/src/target/gsm/src/libgsmd/libgsmd_pin.c
Log:
gsmd: move PIN name to both gsmd and libgsmd (Erin Yueh)


Modified: trunk/src/target/gsm/include/gsmd/event.h
===================================================================
--- trunk/src/target/gsm/include/gsmd/event.h	2007-12-12 19:30:20 UTC (rev 3646)
+++ trunk/src/target/gsm/include/gsmd/event.h	2007-12-13 02:55:54 UTC (rev 3647)
@@ -24,7 +24,7 @@
 
 /* Chapter 8.3 */
 enum gsmd_pin_type {			/* waiting for ... */
-	GSMD_PIN_NONE		= 0,	/* not for any PIN */
+	GSMD_PIN_READY		= 0,	/* not pending for any password */
 	GSMD_PIN_SIM_PIN	= 1,	/* SIM PIN */
 	GSMD_PIN_SIM_PUK	= 2,	/* SIM PUK */
 	GSMD_PIN_PH_SIM_PIN	= 3,	/* phone-to-SIM passowrd */
@@ -43,25 +43,6 @@
 	__NUM_GSMD_PIN
 };
 
-static const char *pin_type_names[__NUM_GSMD_PIN] = {
-	[GSMD_PIN_NONE]		= "NONE",
-	[GSMD_PIN_SIM_PIN]	= "SIM PIN",
-	[GSMD_PIN_SIM_PUK]	= "SIM PUK",
-	[GSMD_PIN_PH_SIM_PIN]	= "Phone-to-SIM PIN",
-	[GSMD_PIN_PH_FSIM_PIN]	= "Phone-to-very-first SIM PIN",
-	[GSMD_PIN_PH_FSIM_PUK]	= "Phone-to-very-first SIM PUK",
-	[GSMD_PIN_SIM_PIN2]	= "SIM PIN2",
-	[GSMD_PIN_SIM_PUK2]	= "SIM PUK2",
-	[GSMD_PIN_PH_NET_PIN]	= "Network personalization PIN",
-	[GSMD_PIN_PH_NET_PUK]	= "Network personalizaiton PUK",
-	[GSMD_PIN_PH_NETSUB_PIN]= "Network subset personalisation PIN",
-	[GSMD_PIN_PH_NETSUB_PUK]= "Network subset personalisation PUK",
-	[GSMD_PIN_PH_SP_PIN]	= "Service provider personalisation PIN",
-	[GSMD_PIN_PH_SP_PUK]	= "Service provider personalisation PUK",
-	[GSMD_PIN_PH_CORP_PIN]	= "Corporate personalisation PIN",
-	[GSMD_PIN_PH_CORP_PUK]	= "Corporate personalisation PUK",
-};
-
 enum gsmd_call_type {
 	GSMD_CALL_NONE		= 0,
 	GSMD_CALL_UNSPEC	= 1,

Modified: trunk/src/target/gsm/src/gsmd/usock.c
===================================================================
--- trunk/src/target/gsm/src/gsmd/usock.c	2007-12-12 19:30:20 UTC (rev 3646)
+++ trunk/src/target/gsm/src/gsmd/usock.c	2007-12-13 02:55:54 UTC (rev 3647)
@@ -303,6 +303,25 @@
 			cmd->id, sizeof(ret), &ret);
 }
 
+static const char *pin_type_names[__NUM_GSMD_PIN] = {
+	[GSMD_PIN_READY]	= "READY",
+	[GSMD_PIN_SIM_PIN]	= "SIM PIN",
+	[GSMD_PIN_SIM_PUK]	= "SIM PUK",
+	[GSMD_PIN_PH_SIM_PIN]	= "Phone-to-SIM PIN",
+	[GSMD_PIN_PH_FSIM_PIN]	= "Phone-to-very-first SIM PIN",
+	[GSMD_PIN_PH_FSIM_PUK]	= "Phone-to-very-first SIM PUK",
+	[GSMD_PIN_SIM_PIN2]	= "SIM PIN2",
+	[GSMD_PIN_SIM_PUK2]	= "SIM PUK2",
+	[GSMD_PIN_PH_NET_PIN]	= "Network personalization PIN",
+	[GSMD_PIN_PH_NET_PUK]	= "Network personalizaiton PUK",
+	[GSMD_PIN_PH_NETSUB_PIN]= "Network subset personalisation PIN",
+	[GSMD_PIN_PH_NETSUB_PUK]= "Network subset personalisation PUK",
+	[GSMD_PIN_PH_SP_PIN]	= "Service provider personalisation PIN",
+	[GSMD_PIN_PH_SP_PUK]	= "Service provider personalisation PUK",
+	[GSMD_PIN_PH_CORP_PIN]	= "Corporate personalisation PIN",
+	[GSMD_PIN_PH_CORP_PUK]	= "Corporate personalisation PUK",
+};
+
 static int get_cpin_cb(struct gsmd_atcmd *cmd, void *ctx, char *resp)
 {
 	enum gsmd_pin_type type;

Modified: trunk/src/target/gsm/src/libgsmd/libgsmd_pin.c
===================================================================
--- trunk/src/target/gsm/src/libgsmd/libgsmd_pin.c	2007-12-12 19:30:20 UTC (rev 3646)
+++ trunk/src/target/gsm/src/libgsmd/libgsmd_pin.c	2007-12-13 02:55:54 UTC (rev 3647)
@@ -28,6 +28,25 @@
 #include <gsmd/event.h>
 #include <libgsmd/libgsmd.h>
 
+static const char *pin_type_names[__NUM_GSMD_PIN] = {
+	[GSMD_PIN_READY]	= "READY",
+	[GSMD_PIN_SIM_PIN]	= "SIM PIN",
+	[GSMD_PIN_SIM_PUK]	= "SIM PUK",
+	[GSMD_PIN_PH_SIM_PIN]	= "Phone-to-SIM PIN",
+	[GSMD_PIN_PH_FSIM_PIN]	= "Phone-to-very-first SIM PIN",
+	[GSMD_PIN_PH_FSIM_PUK]	= "Phone-to-very-first SIM PUK",
+	[GSMD_PIN_SIM_PIN2]	= "SIM PIN2",
+	[GSMD_PIN_SIM_PUK2]	= "SIM PUK2",
+	[GSMD_PIN_PH_NET_PIN]	= "Network personalization PIN",
+	[GSMD_PIN_PH_NET_PUK]	= "Network personalizaiton PUK",
+	[GSMD_PIN_PH_NETSUB_PIN]= "Network subset personalisation PIN",
+	[GSMD_PIN_PH_NETSUB_PUK]= "Network subset personalisation PUK",
+	[GSMD_PIN_PH_SP_PIN]	= "Service provider personalisation PIN",
+	[GSMD_PIN_PH_SP_PUK]	= "Service provider personalisation PUK",
+	[GSMD_PIN_PH_CORP_PIN]	= "Corporate personalisation PIN",
+	[GSMD_PIN_PH_CORP_PUK]	= "Corporate personalisation PUK",
+};
+
 const char *lgsm_pin_name(enum gsmd_pin_type ptype)
 {
 	if (ptype >= __NUM_GSMD_PIN)





More information about the commitlog mailing list