From 9372c0787dbbfa9ce08d28b34380543ba9527574 Mon Sep 17 00:00:00 2001 From: Dietmar Maurer Date: Thu, 21 Jan 2021 17:57:17 +0100 Subject: [PATCH] renamed src/tape/sgutils2.rs -> src/tools/sgutils2.rs --- src/tape/drive/encryption.rs | 8 +++----- src/tape/drive/mam.rs | 2 +- src/tape/drive/tape_alert_flags.rs | 6 +----- src/tape/drive/volume_statistics.rs | 6 +----- src/tape/mod.rs | 2 -- src/tools.rs | 1 + src/{tape => tools}/sgutils2.rs | 0 7 files changed, 7 insertions(+), 18 deletions(-) rename src/{tape => tools}/sgutils2.rs (100%) diff --git a/src/tape/drive/encryption.rs b/src/tape/drive/encryption.rs index 77d05567..a71ae2ff 100644 --- a/src/tape/drive/encryption.rs +++ b/src/tape/drive/encryption.rs @@ -6,11 +6,9 @@ use endian_trait::Endian; use proxmox::tools::io::{ReadExt, WriteExt}; -use crate::{ - tape::sgutils2::{ - SgRaw, - alloc_page_aligned_buffer, - }, +use crate::tools::sgutils2::{ + SgRaw, + alloc_page_aligned_buffer, }; /// Test if drive supports hardware encryption diff --git a/src/tape/drive/mam.rs b/src/tape/drive/mam.rs index ae3da41a..4fa16c3f 100644 --- a/src/tape/drive/mam.rs +++ b/src/tape/drive/mam.rs @@ -9,9 +9,9 @@ use proxmox::tools::io::ReadExt; use crate::{ api2::types::MamAttribute, + tools::sgutils2::SgRaw, tape::{ drive::TapeAlertFlags, - sgutils2::SgRaw, }, }; diff --git a/src/tape/drive/tape_alert_flags.rs b/src/tape/drive/tape_alert_flags.rs index 3ce5b658..e0dc61d8 100644 --- a/src/tape/drive/tape_alert_flags.rs +++ b/src/tape/drive/tape_alert_flags.rs @@ -5,11 +5,7 @@ use anyhow::{bail, format_err, Error}; use proxmox::tools::io::ReadExt; -use crate::{ - tape::{ - sgutils2::SgRaw, - }, -}; +use crate::tools::sgutils2::SgRaw; bitflags::bitflags!{ diff --git a/src/tape/drive/volume_statistics.rs b/src/tape/drive/volume_statistics.rs index 76445fb5..f9fe6550 100644 --- a/src/tape/drive/volume_statistics.rs +++ b/src/tape/drive/volume_statistics.rs @@ -7,11 +7,7 @@ use endian_trait::Endian; use proxmox::tools::io::ReadExt; -use crate::{ - tape::{ - sgutils2::SgRaw, - }, -}; +use crate::tools::sgutils2::SgRaw; /// SCSI command to query volume statistics /// diff --git a/src/tape/mod.rs b/src/tape/mod.rs index 43c33bfa..4e9e1df7 100644 --- a/src/tape/mod.rs +++ b/src/tape/mod.rs @@ -7,8 +7,6 @@ use proxmox::tools::fs::{ CreateOptions, }; -pub mod sgutils2; - pub mod file_formats; mod tape_write; diff --git a/src/tools.rs b/src/tools.rs index d96cd647..bce60d00 100644 --- a/src/tools.rs +++ b/src/tools.rs @@ -42,6 +42,7 @@ pub mod systemd; pub mod ticket; pub mod xattr; pub mod zip; +pub mod sgutils2; pub mod parallel_handler; pub use parallel_handler::ParallelHandler; diff --git a/src/tape/sgutils2.rs b/src/tools/sgutils2.rs similarity index 100% rename from src/tape/sgutils2.rs rename to src/tools/sgutils2.rs