Change command line option processing #82
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There wasn't a strong consensus in #76, but it seems keeping similar command syntax is favored. This allows encrypt and decrypt options to be specified separately. The preferred syntax is now
stenc -f /dev/nst0 -e on -d mixed -k key.txt
Leaving out one of
-e
or-d
will cause stenc to set the modes in tandem.Breaking changes:
-e mixed
no longer works, prefer-e on -d mixed
or simplify-d mixed
bw get <id> | stenc --encrypt=on --key-file=-
--allow-raw-read
or--no-allow-raw-read
(following GNU style).If approved, I will need to rewrite the man page to reflect the option syntax.
Changes command line option processing:
getopt_long
in libc and support long options--unprotect
->--allow-raw-read
,--protect
->--no-allow-raw-read
for clarification--key-file=-