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.
|
||||
fn bsr(count: i32, param: Value) -> Result<(), Error> {
|
||||
fn bsr(count: usize, param: Value) -> Result<(), Error> {
|
||||
|
||||
let mut handle = get_tape_handle(¶m)?;
|
||||
|
||||
unimplemented!();
|
||||
|
||||
// fixme: handle.mtop(MTCmd::MTBSR, count, "backward space records")?;
|
||||
handle.backward_space_count_records(count)?;
|
||||
|
||||
Ok(())
|
||||
}
|
||||
@ -526,12 +524,11 @@ fn fsfm(count: usize, param: Value) -> Result<(), Error> {
|
||||
},
|
||||
)]
|
||||
/// 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)?;
|
||||
|
||||
unimplemented!();
|
||||
// fixme: handle.mtop(MTCmd::MTFSR, count, "forward space records")?;
|
||||
handle.forward_space_count_records(count)?;
|
||||
|
||||
Ok(())
|
||||
}
|
||||
|
@ -195,6 +195,14 @@ impl LtoTapeHandle {
|
||||
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> {
|
||||
self.sg_tape.erase_media(fast)
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user