fix: api-types: add support for lto 9 tape density
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@proxmox.com>
This commit is contained in:
parent
1ce5c27352
commit
a24d24cf9e
@ -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)
|
||||
|
Loading…
x
Reference in New Issue
Block a user