* Validate options against device capabilities
* Use std::reference_wrapper instead of raw pointers
* Reword error message
* Also validate --(no-)allow-raw-read against device capabilities
* --ckod should do a media check
* Changes command line option processing:
- Use getopt_long in libc and support long options
- GNU style option processing (don't try to enforce non-conflicting options)
- GNU style usage message
- Separate encrypt and decrypt settings
- --unprotect -> --allow-raw-read, --protect -> --no-allow-raw-read for clarification
- Change reading key file from stdin using --key-file=-
- Always print detailed status, remove summary "Drive Encryption" line
* Other formatting and style cleanup
* Test output changes
The default CEEM (check external encryption mode) parameter is undocumented, and default of 0 makes behavior vendor-specific. The standard allows for a drive to report an error when trying to read a block that was pre-encrypted before written to the drive, such as is done with a keyless copy of a tape. This sounds like a very rare scenario to need to support. For the widest compatibility with data sources, this should be set to 1 for general-purpose use.
* pull updated template .clang-format with `clang-format-14 --style=llvm --dump-config`, move to base directory so it is shared between `src` and `tests`
* tweak to match existing style a little (e.g. K&R style for function braces)
* run on all sources
* Introduce portable, endian-clean structures using shifts and masks instead of bitfields
* Modernize SCSIExecute with RAII and exceptions
* Convert SP-IN calls to use the new portable SCSI structures and functions
* Convert SP-OUT code to use the new portable SCSI structures and functions
* Delete bitfield-based code and remove runtime endian check
Closes: https://github.com/scsitape/stenc/issues/63