changeset 46:e2ef4b8e4136

main tools: display spenh info when serial back end is used
author Mychaela Falconia <falcon@freecalypso.org>
date Sun, 21 Mar 2021 02:08:02 +0000
parents 9eb5460f51a6
children b0cf75d0bb2d
files libcommon/be_init.c simtool/main.c uicc/main.c
diffstat 3 files changed, 10 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/libcommon/be_init.c	Sun Mar 21 01:56:49 2021 +0000
+++ b/libcommon/be_init.c	Sun Mar 21 02:08:02 2021 +0000
@@ -15,6 +15,7 @@
 
 char be_reader_name[MAX_INIT_STRING+1];
 char be_atr_string[MAX_INIT_STRING+1];
+char be_extra_info[MAX_INIT_STRING+1];
 
 static void
 copy_without_leading_space(input_str, dest)
@@ -53,6 +54,9 @@
 		case 'R':
 			copy_without_leading_space(inbuf + 1, be_reader_name);
 			break;
+		case 'X':
+			copy_without_leading_space(inbuf + 1, be_extra_info);
+			break;
 		}
 	}
 	return(0);
--- a/simtool/main.c	Sun Mar 21 01:56:49 2021 +0000
+++ b/simtool/main.c	Sun Mar 21 02:08:02 2021 +0000
@@ -4,6 +4,7 @@
 
 extern char be_reader_name[];
 extern char be_atr_string[];
+extern char be_extra_info[];
 
 main(argc, argv)
 	char **argv;
@@ -26,6 +27,8 @@
 		printf("Card reader name: %s\n", be_reader_name);
 	if (be_atr_string[0])
 		printf("ATR: %s\n", be_atr_string);
+	if (be_extra_info[0])
+		puts(be_extra_info);
 	for (;;) {
 		if (isatty(0)) {
 			fputs("simtool> ", stdout);
--- a/uicc/main.c	Sun Mar 21 01:56:49 2021 +0000
+++ b/uicc/main.c	Sun Mar 21 02:08:02 2021 +0000
@@ -4,6 +4,7 @@
 
 extern char be_reader_name[];
 extern char be_atr_string[];
+extern char be_extra_info[];
 
 main(argc, argv)
 	char **argv;
@@ -26,6 +27,8 @@
 		printf("Card reader name: %s\n", be_reader_name);
 	if (be_atr_string[0])
 		printf("ATR: %s\n", be_atr_string);
+	if (be_extra_info[0])
+		puts(be_extra_info);
 	for (;;) {
 		if (isatty(0)) {
 			fputs("uicc> ", stdout);