tape: merge MediaStateDatabase into Inventory

This commit is contained in:
Dietmar Maurer
2021-01-01 16:15:13 +01:00
parent 54f4ecd46a
commit cfae8f0656
9 changed files with 205 additions and 313 deletions

View File

@ -34,7 +34,6 @@ use crate::{
tape::{
TAPE_STATUS_DIR,
Inventory,
MediaStateDatabase,
PoolWriter,
MediaPool,
SnapshotReader,
@ -154,12 +153,10 @@ fn update_media_online_status(drive: &str) -> Result<bool, Error> {
let status_path = Path::new(TAPE_STATUS_DIR);
let mut inventory = Inventory::load(status_path)?;
let mut state_db = MediaStateDatabase::load(status_path)?;
update_changer_online_status(
&config,
&mut inventory,
&mut state_db,
&changer_name,
&changer_id_list,
)?;