tape: try to set encryption key with read-label command

This commit is contained in:
Dietmar Maurer 2021-01-21 10:30:29 +01:00
parent 18bd6ba13d
commit 780bc4cad2

View File

@ -544,6 +544,14 @@ pub async fn read_label(
.encryption_key_fingerprint
.as_ref()
.map(|fp| crate::tools::format::as_fingerprint(fp.bytes()));
let encrypt_fingerprint = set.encryption_key_fingerprint.clone()
.map(|fp| (fp, set.uuid.clone()));
if let Err(err) = drive.set_encryption(encrypt_fingerprint) {
// try, but ignore errors. just log to stderr
eprintln!("uable to load encryption key: {}", err);
}
}
if let Some(true) = inventorize {