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:
parent
645f81339f
commit
320b72437c
@ -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;
|
||||
|
@ -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,
|
||||
|
Loading…
Reference in New Issue
Block a user