tape: add pmt bsf

This commit is contained in:
Dietmar Maurer
2021-01-31 17:00:15 +01:00
parent 2f2e83c890
commit 1f31d06f48
2 changed files with 45 additions and 0 deletions

View File

@ -217,6 +217,19 @@ impl LinuxTapeHandle {
Ok(())
}
pub fn backward_space_count_files(&mut self, count: i32) -> Result<(), Error> {
let cmd = mtop { mt_op: MTCmd::MTBSF, mt_count: count, };
unsafe {
mtioctop(self.file.as_raw_fd(), &cmd)
}.map_err(|err| {
format_err!("backward space {} files failed - {}", count, err)
})?;
Ok(())
}
/// Set tape compression feature
pub fn set_compression(&self, on: bool) -> Result<(), Error> {