[pbs-devel] [PATCH proxmox-backup] fix: api-types: add support for lto 9 tape density
Stefan Sterz
s.sterz at proxmox.com
Thu Aug 10 17:37:04 CEST 2023
lto 9 tapes have a new density code which leads to these tapes not
being recognized properly. add the new density code and TapeDensity to
improve lto 9 support. since the documentation states that we support
lto 5 and above this constitutes a bug fix for lto 9 support.
Signed-off-by: Stefan Sterz <s.sterz at proxmox.com>
---
could not test this much, but it build fine. maybe @Dominik could
take another look at this, though.
pbs-api-types/src/tape/drive.rs | 3 +++
1 file changed, 3 insertions(+)
diff --git a/pbs-api-types/src/tape/drive.rs b/pbs-api-types/src/tape/drive.rs
index d841505a..ea2cbbd8 100644
--- a/pbs-api-types/src/tape/drive.rs
+++ b/pbs-api-types/src/tape/drive.rs
@@ -130,6 +130,8 @@ pub enum TapeDensity {
LTO7M8,
/// LTO8
LTO8,
+ /// LTO9
+ LTO9,
}
impl TryFrom<u8> for TapeDensity {
@@ -147,6 +149,7 @@ impl TryFrom<u8> for TapeDensity {
0x5c => TapeDensity::LTO7,
0x5d => TapeDensity::LTO7M8,
0x5e => TapeDensity::LTO8,
+ 0x60 => TapeDensity::LTO9,
_ => bail!("unknown tape density code 0x{:02x}", value),
};
Ok(density)
--
2.39.2
More information about the pbs-devel
mailing list