diff --git a/src/api2/tape/media.rs b/src/api2/tape/media.rs index a8023676..e16477c5 100644 --- a/src/api2/tape/media.rs +++ b/src/api2/tape/media.rs @@ -73,7 +73,7 @@ pub async fn list_media(pool: Option) -> Result, Err let config: MediaPoolConfig = config.lookup("pool", pool_name)?; - let pool = MediaPool::with_config(pool_name, status_path, &config)?; + let pool = MediaPool::with_config(status_path, &config)?; let current_time = proxmox::tools::time::epoch_i64(); diff --git a/src/tape/media_pool.rs b/src/tape/media_pool.rs index 543ed3a3..b4a11e77 100644 --- a/src/tape/media_pool.rs +++ b/src/tape/media_pool.rs @@ -82,7 +82,6 @@ impl MediaPool { /// Creates a new instance using the media pool configuration pub fn with_config( - name: &str, state_path: &Path, config: &MediaPoolConfig, ) -> Result { @@ -91,7 +90,7 @@ impl MediaPool { let retention = config.retention.clone().unwrap_or(String::from("keep")).parse()?; - MediaPool::new(name, state_path, allocation, retention) + MediaPool::new(&config.name, state_path, allocation, retention) } /// Returns the pool name