[pkg-opensc-commit] [opensc] 141/295: opensc-tool: only show the card name if present, to avoid "(null)"
Eric Dorland
eric at moszumanska.debian.org
Sat Jun 24 21:11:24 UTC 2017
This is an automated email from the git hooks/post-receive script.
eric pushed a commit to branch master
in repository opensc.
commit 27c9daeede99b67f45ef211826deb63b5d344b8e
Author: Martin Paljak <martin at martinpaljak.net>
Date: Wed Dec 21 13:00:57 2016 +0200
opensc-tool: only show the card name if present, to avoid "(null)"
Before:
$ opensc-tool -lv
Nr. Card Features Name
0 No FujitsuTechnologySolutions GmbH SmartCase KB SCR eSIG [SmartCase Smartcard Reader] 00 00
1 Yes ACS ACR 38U-CCID 01 00
3b:6e:00:00:80:31:80:66:b0:84:0c:01:6e:01:83:00:90:00 (null)
After:
$ opensc-tool -lv
Nr. Card Features Name
0 No FujitsuTechnologySolutions GmbH SmartCase KB SCR eSIG [SmartCase Smartcard Reader] 00 00
1 Yes ACS ACR 38U-CCID 01 00
3b:6e:00:00:80:31:80:66:b0:84:0c:01:6e:01:83:00:90:00
Change-Id: Id2cb858897cd845d93609e28019c94736b04fa93
closes #921
---
src/tools/opensc-tool.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/tools/opensc-tool.c b/src/tools/opensc-tool.c
index d2236b7..54d3872 100644
--- a/src/tools/opensc-tool.c
+++ b/src/tools/opensc-tool.c
@@ -288,7 +288,7 @@ static int list_readers(void)
if ((r = sc_connect_card(reader, &card)) != SC_SUCCESS) {
fprintf(stderr, " failed: %s\n", sc_strerror(r));
} else {
- printf(" %s %s %s\n", tmp, card->name, state & SC_READER_CARD_INUSE ? "[IN USE]" : "");
+ printf(" %s %s %s\n", tmp, card->name ? card->name : "", state & SC_READER_CARD_INUSE ? "[IN USE]" : "");
sc_disconnect_card(card);
}
}
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-opensc/opensc.git
More information about the pkg-opensc-commit
mailing list