This will break many of people's usages. Until now it was assumed that if --module is not specified the opensc provider is loaded. And as pkcs11-tool is part of opensc, I know many who did not specify this. I know that something was broken recently with finding the default module, however, do you really want to change existing behavior?
On Tue, May 17, 2011 at 4:27 PM, <webmas...@opensc-project.org> wrote: > Revision: 5447 > Author: martin > Date: 2011-05-17 13:27:09 +0000 (Tue, 17 May 2011) > > Log Message: > ----------- > pkcs11-tool: move --module to the first position in help text and make it > mandatory. > > Modified Paths: > -------------- > trunk/src/tools/pkcs11-tool.c > > Modified: trunk/src/tools/pkcs11-tool.c > =================================================================== > --- trunk/src/tools/pkcs11-tool.c 2011-05-16 08:32:07 UTC (rev 5446) > +++ trunk/src/tools/pkcs11-tool.c 2011-05-17 13:27:09 UTC (rev 5447) > @@ -76,6 +76,7 @@ > }; > > static const struct option options[] = { > + { "module", 1, NULL, OPT_MODULE }, > { "show-info", 0, NULL, 'I' }, > { "list-slots", 0, NULL, 'L' }, > { "list-token-slots", 0, NULL, 'T' }, > @@ -113,7 +114,6 @@ > { "attr-from", 1, NULL, OPT_ATTR_FROM }, > { "input-file", 1, NULL, 'i' }, > { "output-file", 1, NULL, 'o' }, > - { "module", 1, NULL, OPT_MODULE }, > > { "test", 0, NULL, 't' }, > { "test-hotplug", 0, NULL, OPT_TEST_HOTPLUG }, > @@ -125,6 +125,7 @@ > }; > > static const char *option_help[] = { > + "Specify the module to load (mandatory)", > "Show global token information", > "List available slots", > "List slots with tokens", > @@ -162,7 +163,6 @@ > "Use <arg> to create some attributes when writing an object", > "Specify the input file", > "Specify the output file", > - "Specify the module to load", > > "Test (best used with the --login or --pin option)", > "Test hotplug capabilities (C_GetSlotList + C_WaitForSlotEvent)", > @@ -544,6 +544,10 @@ > util_print_usage_and_die(app_name, options, > option_help); > } > } > + > + if (opt_module == NULL) > + util_print_usage_and_die(app_name, options, option_help); > + > if (action_count == 0) > util_print_usage_and_die(app_name, options, option_help); > > > > _______________________________________________ > opensc-commits mailing list > opensc-comm...@lists.opensc-project.org > http://www.opensc-project.org/mailman/listinfo/opensc-commits > _______________________________________________ opensc-devel mailing list opensc-devel@lists.opensc-project.org http://www.opensc-project.org/mailman/listinfo/opensc-devel