tape: read_drive_status - ignore media changed sense info

This commit is contained in:
Dietmar Maurer 2021-04-09 09:45:28 +02:00
parent 44f6bb019c
commit c560cfddca
1 changed files with 5 additions and 0 deletions

View File

@ -44,6 +44,7 @@ use crate::{
alloc_page_aligned_buffer,
scsi_inquiry,
scsi_mode_sense,
scsi_request_sense,
},
};
@ -657,6 +658,10 @@ impl SgTape {
/// block_descriptor. This is all information we need for now.
pub fn read_drive_status(&mut self) -> Result<LtoTapeStatus, Error> {
// We do a Request Sense, but ignore the result.
// This clears deferred error or media changed events.
let _ = scsi_request_sense(&mut self.file);
let (head, block_descriptor, page) = self.read_compression_page()?;
Ok(LtoTapeStatus {