tape: improve MediaChange trait

We expose the whole MtxStatus, and we can load/store from/to
specified slot numbers.
This commit is contained in:
Dietmar Maurer
2021-01-07 14:26:43 +01:00
parent 632756b6fb
commit 46a1863f88
9 changed files with 300 additions and 174 deletions

View File

@ -145,11 +145,11 @@ fn update_media_online_status(drive: &str) -> Result<bool, Error> {
let mut has_changer = false;
if let Ok(Some((changer, changer_name))) = media_changer(&config, drive) {
if let Ok(Some((mut changer, changer_name))) = media_changer(&config, drive) {
has_changer = true;
let changer_id_list = changer.list_media_changer_ids()?;
let changer_id_list = changer.online_media_changer_ids()?;
let status_path = Path::new(TAPE_STATUS_DIR);
let mut inventory = Inventory::load(status_path)?;