changeset 126:7faec607500f

rehab-{imsi,loci} commands implemented
author Mychaela Falconia <falcon@freecalypso.org>
date Sat, 20 Feb 2021 19:37:52 +0000
parents e5d534fa5924
children 08ba6a5d8a3f
files simtool/dispatch.c simtool/inval_rehab.c
diffstat 2 files changed, 30 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/simtool/dispatch.c	Sat Feb 20 19:21:40 2021 +0000
+++ b/simtool/dispatch.c	Sat Feb 20 19:37:52 2021 +0000
@@ -54,6 +54,8 @@
 extern int cmd_readef();
 extern int cmd_readrec();
 extern int cmd_rehab_adn();
+extern int cmd_rehab_imsi();
+extern int cmd_rehab_loci();
 extern int cmd_restore_file();
 extern int cmd_savebin();
 extern int cmd_save_sms_bin();
@@ -162,6 +164,8 @@
 	{"readef", 1, 1, 1, cmd_readef},
 	{"readrec", 1, 2, 1, cmd_readrec},
 	{"rehab-adn", 0, 0, 0, cmd_rehab_adn},
+	{"rehab-imsi", 0, 0, 0, cmd_rehab_imsi},
+	{"rehab-loci", 0, 0, 0, cmd_rehab_loci},
 	{"restore-file", 2, 2, 0, cmd_restore_file},
 	{"savebin", 2, 2, 0, cmd_savebin},
 	{"save-sms-bin", 1, 1, 0, cmd_save_sms_bin},
--- a/simtool/inval_rehab.c	Sat Feb 20 19:21:40 2021 +0000
+++ b/simtool/inval_rehab.c	Sat Feb 20 19:37:52 2021 +0000
@@ -77,3 +77,29 @@
 		return(rc);
 	return current_ef_rehab();
 }
+
+cmd_rehab_imsi()
+{
+	int rc;
+
+	rc = select_op(DF_GSM);
+	if (rc < 0)
+		return(rc);
+	rc = select_op(EF_IMSI);
+	if (rc < 0)
+		return(rc);
+	return current_ef_rehab();
+}
+
+cmd_rehab_loci()
+{
+	int rc;
+
+	rc = select_op(DF_GSM);
+	if (rc < 0)
+		return(rc);
+	rc = select_op(EF_LOCI);
+	if (rc < 0)
+		return(rc);
+	return current_ef_rehab();
+}