tape: abort backup when we detect critical tape alert flags

This commit is contained in:
Dietmar Maurer
2021-01-09 12:34:00 +01:00
parent 7273ba3de2
commit 5843268c47
4 changed files with 40 additions and 21 deletions

View File

@ -151,6 +151,14 @@ pub trait TapeDriver {
/// Eject media
fn eject_media(&mut self) -> Result<(), Error>;
/// Read Tape Alert Flags
///
/// This make only sense for real LTO drives. Virtual tape drives should
/// simply return empty flags (default).
fn tape_alert_flags(&mut self) -> Result<TapeAlertFlags, Error> {
Ok(TapeAlertFlags::empty())
}
}
/// Get the media changer (MediaChange + name) associated with a tape drive.