Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update status output format #108

Merged
merged 2 commits into from
May 1, 2023
Merged

Conversation

jmwilson
Copy link
Contributor

@jmwilson jmwilson commented May 1, 2023

Update the status output format with some improvements for brevity and understanding:

  1. move the vendor and product info to a single line following the device name. These fields in scsiencrypt.h are now declared with std::array to make it a one-liner in modern C++ to rtrim and print them.
  2. replace Drive input: Encrypting with Writing: Encrypting and Drive output: Decrypting with Reading: Encrypting. This better matches how a tape drive is typically used in a UNIX command or pipe (since "Drive input" refers the action that is done when the drive is used as the output file of command such as dd if=src of=/dev/nst0)
  3. change Volume Encryption: Encrypted to Current block status: Encrypted. "Volume" is not a term used in mt or other tape programs. The SCSI data is being printed is actually called "next block encryption status" since it refers to the block following the current tape position.
  4. Print algorithm name (e.g. AES-256-GCM-128) instead of the algorithm index where possible.

Other changes:

  1. update README to reflect new output
  2. test file output.cpp updated for new output
  3. reduce code duplication in scsiencrypt.cpp debug output with a new function print_buffer. Including in this PR to reduce merge conflicts.

Follow-on PR with fixing include headers using include-what-you-use to follow.

@jonasstein jonasstein merged commit daa541a into scsitape:master May 1, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants