Hi, please find attached 2 one-line patches for OpenSC-explorer:
* [PATCH 1/2] opensc-explorer: more room for commands in 'help' In the output of the interacive command 'help', leave more room for the command names so that they do not flow into the description. * [PATCH 2/2] opensc-explorer: use relative addressing in do_asn1 'asn1' takes a file_id as argument. This should be selected relative to the currently selected DF instead of being treated as an ID. (compare with 'get' & 'cat' that also take a file_id argument) It would be great if they'd make it into OpenSC mainline For those using git, the patches can be found in the 'explorer' branch of my OpenSC repo at github: https://github.com/marschap/OpenSC/commits/explorer This branch is ahead of the master branch (which is identical to the master branch of martinpaljak's OpenSC repo as of this evening) by the 2 commits mentioned above. Best PEter -- Peter Marschall pe...@adpm.de
From f8e818af7820a92d81f19627d6dc68b9d3ea964f Mon Sep 17 00:00:00 2001 From: Peter Marschall <pe...@adpm.de> Date: Mon, 25 Apr 2011 14:18:41 +0200 Subject: [PATCH 1/2] opensc-explorer: more room for commands in 'help' In the output of the interacive command 'help', leave more room for the command names so that they do not flow into the descrition. Signed-off-by: Peter Marschall <pe...@adpm.de> --- src/tools/opensc-explorer.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/src/tools/opensc-explorer.c b/src/tools/opensc-explorer.c index 337303f..28d3679 100644 --- a/src/tools/opensc-explorer.c +++ b/src/tools/opensc-explorer.c @@ -1467,7 +1467,7 @@ static void usage(void) printf("Supported commands:\n"); for (cmd = cmds; cmd->name; cmd++) - printf(" %-10s %s\n", cmd->name, cmd->help); + printf(" %-16s %s\n", cmd->name, cmd->help); } static int parse_line(char *in, char **argv, int maxargc) -- 1.7.4.4
From 3e53edd1aeeeeb8e541d34f03a0ecf386a774a20 Mon Sep 17 00:00:00 2001 From: Peter Marschall <pe...@adpm.de> Date: Mon, 25 Apr 2011 15:17:03 +0200 Subject: [PATCH 2/2] opensc-explorer: use relative addressing in do_asn1 'asn1' takes a file_id as argument. This should be selected relative to the currently selected DF instead of being treated as an ID. (compare with 'get' & 'cat' that also take a file_id argument) Signed-off-by: Peter Marschall <pe...@adpm.de> --- src/tools/opensc-explorer.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/src/tools/opensc-explorer.c b/src/tools/opensc-explorer.c index 28d3679..9590697 100644 --- a/src/tools/opensc-explorer.c +++ b/src/tools/opensc-explorer.c @@ -1373,7 +1373,7 @@ static int do_asn1(int argc, char **argv) /* select file */ if (argc) { - if (arg_to_path(argv[0], &path, 1) != 0) { + if (arg_to_path(argv[0], &path, 0) != 0) { puts("Invalid file path"); return -1; } -- 1.7.4.4
_______________________________________________ opensc-devel mailing list opensc-devel@lists.opensc-project.org http://www.opensc-project.org/mailman/listinfo/opensc-devel