tape: add TapeDensity::Unknown
This commit is contained in:
parent
48c4193f7c
commit
1a23132262
@ -119,6 +119,8 @@ pub struct MamAttribute {
|
|||||||
#[api()]
|
#[api()]
|
||||||
#[derive(Serialize,Deserialize,Copy,Clone,Debug)]
|
#[derive(Serialize,Deserialize,Copy,Clone,Debug)]
|
||||||
pub enum TapeDensity {
|
pub enum TapeDensity {
|
||||||
|
/// Unknown (no media loaded)
|
||||||
|
Unknown,
|
||||||
/// LTO1
|
/// LTO1
|
||||||
LTO1,
|
LTO1,
|
||||||
/// LTO2
|
/// LTO2
|
||||||
@ -144,6 +146,7 @@ impl TryFrom<u8> for TapeDensity {
|
|||||||
|
|
||||||
fn try_from(value: u8) -> Result<Self, Self::Error> {
|
fn try_from(value: u8) -> Result<Self, Self::Error> {
|
||||||
let density = match value {
|
let density = match value {
|
||||||
|
0x00 => TapeDensity::Unknown,
|
||||||
0x40 => TapeDensity::LTO1,
|
0x40 => TapeDensity::LTO1,
|
||||||
0x42 => TapeDensity::LTO2,
|
0x42 => TapeDensity::LTO2,
|
||||||
0x44 => TapeDensity::LTO3,
|
0x44 => TapeDensity::LTO3,
|
||||||
|
Loading…
Reference in New Issue
Block a user