From 1a23132262ab38ef854ca89749af7bdc0d9a0619 Mon Sep 17 00:00:00 2001 From: Dietmar Maurer Date: Thu, 8 Apr 2021 12:23:54 +0200 Subject: [PATCH] tape: add TapeDensity::Unknown --- src/api2/types/tape/drive.rs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/api2/types/tape/drive.rs b/src/api2/types/tape/drive.rs index 878bc133..d060acc5 100644 --- a/src/api2/types/tape/drive.rs +++ b/src/api2/types/tape/drive.rs @@ -119,6 +119,8 @@ pub struct MamAttribute { #[api()] #[derive(Serialize,Deserialize,Copy,Clone,Debug)] pub enum TapeDensity { + /// Unknown (no media loaded) + Unknown, /// LTO1 LTO1, /// LTO2 @@ -144,6 +146,7 @@ impl TryFrom for TapeDensity { fn try_from(value: u8) -> Result { let density = match value { + 0x00 => TapeDensity::Unknown, 0x40 => TapeDensity::LTO1, 0x42 => TapeDensity::LTO2, 0x44 => TapeDensity::LTO3,