updates
This commit is contained in:
@@ -252,7 +252,11 @@ impl fmt::Display for ReadError {
|
||||
#[derive(Debug, Clone)]
|
||||
pub struct TimedRead {
|
||||
pub result: Result<usize, ReadError>,
|
||||
/// Whole milliseconds, matching the C ABI.
|
||||
pub milliseconds: i32,
|
||||
/// Higher precision duration for internal timing analysis. Backends
|
||||
/// that only know millisecond figures fill this with `ms * 1000`.
|
||||
pub microseconds: i64,
|
||||
}
|
||||
|
||||
/// Backend interface used by both the command line program and the C ABI.
|
||||
@@ -318,7 +322,29 @@ pub trait Drive {
|
||||
fn set_bigendianp(&mut self, value: i32);
|
||||
fn nsectors(&self) -> i64;
|
||||
fn set_nsectors(&mut self, value: i64);
|
||||
/// Enable or disable the low-level read retry loop. Cache analysis
|
||||
/// disables retries so that timing reflects the first access.
|
||||
fn set_error_retry(&mut self, _enabled: bool) {}
|
||||
fn interface(&self) -> InterfaceKind;
|
||||
/// Optional drive attributes exposed through the C ABI.
|
||||
fn is_atapi(&self) -> bool {
|
||||
false
|
||||
}
|
||||
fn is_mmc(&self) -> bool {
|
||||
false
|
||||
}
|
||||
fn density(&self) -> u8 {
|
||||
0
|
||||
}
|
||||
fn fua(&self) -> bool {
|
||||
false
|
||||
}
|
||||
fn lun(&self) -> i32 {
|
||||
0
|
||||
}
|
||||
fn adjust_ssize(&self) -> i64 {
|
||||
1
|
||||
}
|
||||
fn cdda_version(&self) -> &'static str {
|
||||
crate::VERSIONNUM
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user