tape: cleanup - use ScsiMediaChange trait instead of mtx_status()
This commit is contained in:
parent
697c41c584
commit
2b96a43879
@ -17,7 +17,7 @@ use crate::{
|
|||||||
MediaChange,
|
MediaChange,
|
||||||
MtxStatus,
|
MtxStatus,
|
||||||
ElementStatus,
|
ElementStatus,
|
||||||
mtx::mtx_status,
|
ScsiMediaChange,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
@ -133,8 +133,8 @@ pub fn update_online_status(state_path: &Path) -> Result<OnlineStatusMap, Error>
|
|||||||
|
|
||||||
let mut map = OnlineStatusMap::new(&config)?;
|
let mut map = OnlineStatusMap::new(&config)?;
|
||||||
|
|
||||||
for changer in changers {
|
for mut changer in changers {
|
||||||
let status = match mtx_status(&changer) {
|
let status = match changer.status() {
|
||||||
Ok(status) => status,
|
Ok(status) => status,
|
||||||
Err(err) => {
|
Err(err) => {
|
||||||
eprintln!("unable to get changer '{}' status - {}", changer.name, err);
|
eprintln!("unable to get changer '{}' status - {}", changer.name, err);
|
||||||
|
Loading…
Reference in New Issue
Block a user