tape: pmt - re-implement fsr/bsr
This commit is contained in:
parent
0892a512bc
commit
7f7459677d
@ -229,13 +229,11 @@ fn bsfm(count: usize, param: Value) -> Result<(), Error> {
|
|||||||
},
|
},
|
||||||
)]
|
)]
|
||||||
/// Backward space records.
|
/// Backward space records.
|
||||||
fn bsr(count: i32, param: Value) -> Result<(), Error> {
|
fn bsr(count: usize, param: Value) -> Result<(), Error> {
|
||||||
|
|
||||||
let mut handle = get_tape_handle(¶m)?;
|
let mut handle = get_tape_handle(¶m)?;
|
||||||
|
|
||||||
unimplemented!();
|
handle.backward_space_count_records(count)?;
|
||||||
|
|
||||||
// fixme: handle.mtop(MTCmd::MTBSR, count, "backward space records")?;
|
|
||||||
|
|
||||||
Ok(())
|
Ok(())
|
||||||
}
|
}
|
||||||
@ -526,12 +524,11 @@ fn fsfm(count: usize, param: Value) -> Result<(), Error> {
|
|||||||
},
|
},
|
||||||
)]
|
)]
|
||||||
/// Forward space records.
|
/// Forward space records.
|
||||||
fn fsr(count: i32, param: Value) -> Result<(), Error> {
|
fn fsr(count: usize, param: Value) -> Result<(), Error> {
|
||||||
|
|
||||||
let mut handle = get_tape_handle(¶m)?;
|
let mut handle = get_tape_handle(¶m)?;
|
||||||
|
|
||||||
unimplemented!();
|
handle.forward_space_count_records(count)?;
|
||||||
// fixme: handle.mtop(MTCmd::MTFSR, count, "forward space records")?;
|
|
||||||
|
|
||||||
Ok(())
|
Ok(())
|
||||||
}
|
}
|
||||||
|
@ -195,6 +195,14 @@ impl LtoTapeHandle {
|
|||||||
self.sg_tape.space_filemarks(-isize::try_from(count)?)
|
self.sg_tape.space_filemarks(-isize::try_from(count)?)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
pub fn forward_space_count_records(&mut self, count: usize) -> Result<(), Error> {
|
||||||
|
self.sg_tape.space_blocks(isize::try_from(count)?)
|
||||||
|
}
|
||||||
|
|
||||||
|
pub fn backward_space_count_records(&mut self, count: usize) -> Result<(), Error> {
|
||||||
|
self.sg_tape.space_blocks(-isize::try_from(count)?)
|
||||||
|
}
|
||||||
|
|
||||||
pub fn erase_media(&mut self, fast: bool) -> Result<(), Error> {
|
pub fn erase_media(&mut self, fast: bool) -> Result<(), Error> {
|
||||||
self.sg_tape.erase_media(fast)
|
self.sg_tape.erase_media(fast)
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user