5
0
mirror of git://git.proxmox.com/git/proxmox-backup.git synced 2025-01-10 01:18:06 +03:00

tape: drop unused has_encryption helper

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
This commit is contained in:
Thomas Lamprecht 2024-01-22 14:42:28 +01:00
parent 645f81339f
commit 320b72437c
2 changed files with 1 additions and 12 deletions

View File

@ -9,7 +9,7 @@ use endian_trait::Endian;
use nix::fcntl::{fcntl, FcntlArg, OFlag};
mod encryption;
pub use encryption::{drive_set_encryption, drive_get_encryption, has_encryption};
pub use encryption::{drive_set_encryption, drive_get_encryption};
mod volume_statistics;
use proxmox_uuid::Uuid;

View File

@ -8,17 +8,6 @@ use proxmox_io::{ReadExt, WriteExt};
use crate::sgutils2::{alloc_page_aligned_buffer, SgRaw};
/// Test if drive supports hardware encryption
///
/// We search for AES_GCM algorithm with 256bits key.
pub fn has_encryption<F: AsRawFd>(file: &mut F) -> bool {
let data = match sg_spin_data_encryption_caps(file) {
Ok(data) => data,
Err(_) => return false,
};
decode_spin_data_encryption_caps(&data).is_ok()
}
/// Set or clear encryption key
///
/// We always use mixed mode,