tape: cleanup - use ScsiMediaChange trait instead of mtx_status()

This commit is contained in:
Dietmar Maurer 2021-01-25 13:25:22 +01:00
parent 697c41c584
commit 2b96a43879

View File

@ -17,7 +17,7 @@ use crate::{
MediaChange,
MtxStatus,
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)?;
for changer in changers {
let status = match mtx_status(&changer) {
for mut changer in changers {
let status = match changer.status() {
Ok(status) => status,
Err(err) => {
eprintln!("unable to get changer '{}' status - {}", changer.name, err);