- remove command line option '--card-driver';
- instead force driver 'dnie' and fail if card is not a DNIe card
- overhaul option parsing
- remove unused variable 'long_optind'
- bail out with usage message on all unknown/unhandled args
- correctly terminate option parsing (no infinite loop)
- slight refactoring
- avoid magic constant '0x0f'
- make variable 'tries_left' more local
- move dependent code into if block
Rename option '--driver' to '--card-driver' for increased consistency.
In addition, extend it the same way opensc-explorer was extended. I.e.
treat the question mark given as argument to option '--card-driver'
special: list all available drivers instead of stupidly bailing out.
In contrast to opensc-tool and opensc-explorer, which are card-agnostic,
I am not sure whether the option '--card-driver' makes sense on this
card-specific tool.
* get rid of hard-coded markup like e.g. { ... | ... } or [ ... ]
in favour of DocBook's proper tags
* use tags better matching the purpose,
e.g. use <filename class"directory"> instead of <command> for directories
* improve consistency in <replaceable>s
Experienced a problem with dnie-tool where I would receive a warning with the content of /etc/bash_completion.d/dnie-tool.
The cause of the error was a missing case label which in turn was caused by the formatting of the dnie-tool.1.xml.
Options were formatted like <term><option--xarg, -x</option></term> which were not handled by the sed regular expression in the makefiles.
Modified the dnie-tool.1.xml file to be consistent with the other doc files and to generate the dnie-tool file correctly.