]> git.proxmox.com Git - proxmox-backup.git/commitdiff
tape: drop unused has_encryption helper
authorThomas Lamprecht <t.lamprecht@proxmox.com>
Mon, 22 Jan 2024 13:42:28 +0000 (14:42 +0100)
committerThomas Lamprecht <t.lamprecht@proxmox.com>
Mon, 22 Jan 2024 13:43:54 +0000 (14:43 +0100)
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
pbs-tape/src/sg_tape.rs
pbs-tape/src/sg_tape/encryption.rs

index 44f30fdb26a141a205b5290d70aa486bb775129e..3ba28a6a011d795ad694226278fa99ce76c13821 100644 (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;
index d460c2f768bf9b4b78cacfa5742ed6df2acec8df..9fafb62a883a5c1f4624a50c51c9cea7f5317055 100644 (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,