| 1 |
//! Disk I/O 2 Protocol |
| 2 |
//! |
| 3 |
//! Extends the Disk I/O protocol interface to enable non-blocking / |
| 4 |
//! asynchronous byte-oriented disk operation. |
| 5 |
|
| 6 |
pub const PROTOCOL_GUID: crate::base::Guid = crate::base::Guid::from_fields( |
| 7 |
0x151c8eae, |
| 8 |
0x7f2c, |
| 9 |
0x472c, |
| 10 |
0x9e, |
| 11 |
0x54, |
| 12 |
&[0x98, 0x28, 0x19, 0x4f, 0x6a, 0x88], |
| 13 |
); |
| 14 |
|
| 15 |
pub const REVISION: u64 = 0x0000000000020000u64; |
| 16 |
|
| 17 |
#[repr(C)] |
| 18 |
#[derive(Clone, Copy, Debug)] |
| 19 |
pub struct Token { |
| 20 |
event: crate::base::Event, |
| 21 |
transaction_status: crate::base::Status, |
| 22 |
} |
| 23 |
|
| 24 |
pub type ProtocolCancel = eficall! {fn( |
| 25 |
*mut Protocol, |
| 26 |
) -> crate::base::Status}; |
| 27 |
|
| 28 |
pub type ProtocolReadDiskEx = eficall! {fn( |
| 29 |
*mut Protocol, |
| 30 |
u32, |
| 31 |
u64, |
| 32 |
*mut Token, |
| 33 |
usize, |
| 34 |
*mut core::ffi::c_void, |
| 35 |
) -> crate::base::Status}; |
| 36 |
|
| 37 |
pub type ProtocolWriteDiskEx = eficall! {fn( |
| 38 |
*mut Protocol, |
| 39 |
u32, |
| 40 |
u64, |
| 41 |
*mut Token, |
| 42 |
usize, |
| 43 |
*mut core::ffi::c_void, |
| 44 |
) -> crate::base::Status}; |
| 45 |
|
| 46 |
pub type ProtocolFlushDiskEx = eficall! {fn( |
| 47 |
*mut Protocol, |
| 48 |
*mut Token, |
| 49 |
) -> crate::base::Status}; |
| 50 |
|
| 51 |
#[repr(C)] |
| 52 |
pub struct Protocol { |
| 53 |
pub revision: u64, |
| 54 |
pub cancel: ProtocolCancel, |
| 55 |
pub read_disk_ex: ProtocolReadDiskEx, |
| 56 |
pub write_disk_ex: ProtocolWriteDiskEx, |
| 57 |
pub flush_disk_ex: ProtocolFlushDiskEx, |
| 58 |
} |