tape: cleanup - rename 'info' to 'media_id'
This commit is contained in:
parent
74595b8821
commit
f046313c0e
@ -340,7 +340,7 @@ fn drive_load_and_label_media(
|
||||
media_id: &MediaId,
|
||||
) -> Result<(Box<dyn TapeDriver>, MediaCatalog), Error> {
|
||||
|
||||
let (mut tmp_drive, info) =
|
||||
let (mut tmp_drive, media_id) =
|
||||
request_and_load_media(worker, &drive_config, &drive_name, &media_id.label)?;
|
||||
|
||||
let media_catalog;
|
||||
@ -354,16 +354,16 @@ fn drive_load_and_label_media(
|
||||
|
||||
let status_path = Path::new(TAPE_STATUS_DIR);
|
||||
|
||||
match &info.media_set_label {
|
||||
match &media_id.media_set_label {
|
||||
None => {
|
||||
println!("wrinting new media set label");
|
||||
tmp_drive.write_media_set_label(new_set)?;
|
||||
|
||||
let info = MediaId {
|
||||
label: info.label,
|
||||
let media_id = MediaId {
|
||||
label: media_id.label,
|
||||
media_set_label: Some(new_set.clone()),
|
||||
};
|
||||
media_catalog = MediaCatalog::overwrite(status_path, &info, true)?;
|
||||
media_catalog = MediaCatalog::overwrite(status_path, &media_id, true)?;
|
||||
}
|
||||
Some(media_set_label) => {
|
||||
if new_set.uuid == media_set_label.uuid {
|
||||
@ -378,11 +378,11 @@ fn drive_load_and_label_media(
|
||||
|
||||
tmp_drive.write_media_set_label(new_set)?;
|
||||
|
||||
let info = MediaId {
|
||||
label: info.label,
|
||||
let media_id = MediaId {
|
||||
label: media_id.label,
|
||||
media_set_label: Some(new_set.clone()),
|
||||
};
|
||||
media_catalog = MediaCatalog::overwrite(status_path, &info, true)?;
|
||||
media_catalog = MediaCatalog::overwrite(status_path, &media_id, true)?;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user