tape: MediaChange - add transfer, implement export
This commit is contained in:
1 parent
e6217b8b36
commit
0057f0e580
3 files changed
+56
-1
No files matched your search
@@ -393,6 +393,10 @@ impl MediaChange for VirtualTapeHandle {
|
||||
Ok(MtxStatus { drives, slots })
|
||||
}
|
||||
|
||||
fn transfer(&mut self, from: u64, to: u64) -> Result<(), Error> {
|
||||
bail!("medfia tranfer is not implemented!");
|
||||
}
|
||||
|
||||
fn load_media_from_slot(&mut self, slot: u64) -> Result<(), Error> {
|
||||
if slot < 1 {
|
||||
bail!("invalid slot ID {}", slot);
|
||||
@@ -452,6 +456,11 @@ impl MediaChange for VirtualTapeDrive {
|
||||
handle.status()
|
||||
}
|
||||
|
||||
fn transfer(&mut self, from: u64, to: u64) -> Result<(), Error> {
|
||||
let mut handle = self.open()?;
|
||||
handle.transfer(from, to)
|
||||
}
|
||||
|
||||
fn load_media_from_slot(&mut self, slot: u64) -> Result<(), Error> {
|
||||
let mut handle = self.open()?;
|
||||
handle.load_media_from_slot(slot)
|
||||
|
||||
Reference in new issue
Block a user