tape: read_drive_status - ignore media changed sense info
This commit is contained in:
parent
44f6bb019c
commit
c560cfddca
@ -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 {
|
||||
|
Loading…
Reference in New Issue
Block a user