@@ -28,12 +28,10 @@ impl DiskIo {
28
28
/// * `buffer` - Pointer to a buffer to read into.
29
29
///
30
30
/// # Errors:
31
- /// * `uefi::status::INVALID_PARAMETER` The read request contains device addresses that
32
- /// are not valid for the device.
33
- /// * `uefi::status::DEVICE_ERROR` The device reported an error while performing
34
- /// the read operation.
35
- /// * `uefi::status::NO_MEDIA` There is no medium in the device.
36
- /// * `uefi::status::MEDIA_CHANGED` `media_id` is not for the current medium.
31
+ /// * [`Status::INVALID_PARAMETER`] The read request contains device addresses that are not valid for the device.
32
+ /// * [`Status::DEVICE_ERROR`] The device reported an error while performing the read operation.
33
+ /// * [`Status::NO_MEDIA`] There is no medium in the device.
34
+ /// * [`Status::MEDIA_CHANGED`] `media_id` is not for the current medium.
37
35
pub fn read_disk ( & self , media_id : u32 , offset : u64 , buffer : & mut [ u8 ] ) -> Result {
38
36
unsafe {
39
37
( self . 0 . read_disk ) (
@@ -55,13 +53,11 @@ impl DiskIo {
55
53
/// * `buffer` - Pointer to a buffer to write from.
56
54
///
57
55
/// # Errors:
58
- /// * `uefi::status::INVALID_PARAMETER` The write request contains device addresses that
59
- /// are not valid for the device.
60
- /// * `uefi::status::DEVICE_ERROR` The device reported an error while performing
61
- /// the write operation.
62
- /// * `uefi::status::NO_MEDIA` There is no medium in the device.
63
- /// * `uefi::status::MEDIA_CHANGED` `media_id` is not for the current medium.
64
- /// * `uefi::status::WRITE_PROTECTED` The device cannot be written to.
56
+ /// * [`Status::INVALID_PARAMETER`] The write request contains device addresses that are not valid for the device.
57
+ /// * [`Status::DEVICE_ERROR`] The device reported an error while performing the write operation.
58
+ /// * [`Status::NO_MEDIA`] There is no medium in the device.
59
+ /// * [`Status::MEDIA_CHANGED`] `media_id` is not for the current medium.
60
+ /// * [`Status::WRITE_PROTECTED`] The device cannot be written to.
65
61
pub fn write_disk ( & mut self , media_id : u32 , offset : u64 , buffer : & [ u8 ] ) -> Result {
66
62
unsafe {
67
63
( self . 0 . write_disk ) (
@@ -99,7 +95,7 @@ impl DiskIo2 {
99
95
/// Terminates outstanding asynchronous requests to the device.
100
96
///
101
97
/// # Errors:
102
- /// * `uefi::status:: DEVICE_ERROR` The device reported an error while performing
98
+ /// * [`Status:: DEVICE_ERROR`] The device reported an error while performing
103
99
/// the cancel operation.
104
100
pub fn cancel ( & mut self ) -> Result {
105
101
unsafe { ( self . 0 . cancel ) ( & mut self . 0 ) } . to_result ( )
@@ -120,14 +116,11 @@ impl DiskIo2 {
120
116
/// tracking is required.
121
117
///
122
118
/// # Errors:
123
- /// * `uefi::status::INVALID_PARAMETER` The read request contains device addresses
124
- /// that are not valid for the device.
125
- /// * `uefi::status::OUT_OF_RESOURCES` The request could not be completed due to
126
- /// a lack of resources.
127
- /// * `uefi::status::MEDIA_CHANGED` `media_id` is not for the current medium.
128
- /// * `uefi::status::NO_MEDIA` There is no medium in the device.
129
- /// * `uefi::status::DEVICE_ERROR` The device reported an error while performing
130
- /// the read operation.
119
+ /// * [`Status::INVALID_PARAMETER`] The read request contains device addresses that are not valid for the device.
120
+ /// * [`Status::OUT_OF_RESOURCES`] The request could not be completed due to a lack of resources.
121
+ /// * [`Status::MEDIA_CHANGED`] `media_id` is not for the current medium.
122
+ /// * [`Status::NO_MEDIA`] There is no medium in the device.
123
+ /// * [`Status::DEVICE_ERROR`] The device reported an error while performing the read operation.
131
124
pub unsafe fn read_disk_raw (
132
125
& self ,
133
126
media_id : u32 ,
@@ -156,15 +149,12 @@ impl DiskIo2 {
156
149
/// tracking is required.
157
150
///
158
151
/// # Errors:
159
- /// * `uefi::status::INVALID_PARAMETER` The write request contains device addresses
160
- /// that are not valid for the device.
161
- /// * `uefi::status::OUT_OF_RESOURCES` The request could not be completed due to
162
- /// a lack of resources.
163
- /// * `uefi::status::MEDIA_CHANGED` `media_id` is not for the current medium.
164
- /// * `uefi::status::NO_MEDIA` There is no medium in the device.
165
- /// * `uefi::status::DEVICE_ERROR` The device reported an error while performing
166
- /// the write operation.
167
- /// * `uefi::status::WRITE_PROTECTED` The device cannot be written to.
152
+ /// * [`Status::INVALID_PARAMETER`] The write request contains device addresses that are not valid for the device.
153
+ /// * [`Status::OUT_OF_RESOURCES`] The request could not be completed due to a lack of resources.
154
+ /// * [`Status::MEDIA_CHANGED` `media_id` is not for the current medium.
155
+ /// * [`Status::NO_MEDIA`] There is no medium in the device.
156
+ /// * [`Status::DEVICE_ERROR`] The device reported an error while performing the write operation.
157
+ /// * [`Status::WRITE_PROTECTED`] The device cannot be written to.
168
158
pub unsafe fn write_disk_raw (
169
159
& mut self ,
170
160
media_id : u32 ,
@@ -191,14 +181,11 @@ impl DiskIo2 {
191
181
/// * `token` - Transaction token for the asynchronous flush.
192
182
///
193
183
/// # Errors:
194
- /// * `uefi::status::OUT_OF_RESOURCES` The request could not be completed due to
195
- /// a lack of resources.
196
- /// * `uefi::status::MEDIA_CHANGED` The medium in the device has changed since
197
- /// the last access.
198
- /// * `uefi::status::NO_MEDIA` There is no medium in the device.
199
- /// * `uefi::status::DEVICE_ERROR` The device reported an error while performing
200
- /// the flush operation.
201
- /// * `uefi::status::WRITE_PROTECTED` The device cannot be written to.
184
+ /// * [`Status::OUT_OF_RESOURCES`] The request could not be completed due to a lack of resources.
185
+ /// * [`Status::MEDIA_CHANGED`] The medium in the device has changed since the last access.
186
+ /// * [`Status::NO_MEDIA`] There is no medium in the device.
187
+ /// * [`Status::DEVICE_ERROR`] The device reported an error while performing the flush operation.
188
+ /// * [`Status::WRITE_PROTECTED`] The device cannot be written to.
202
189
pub fn flush_disk ( & mut self , token : Option < NonNull < DiskIo2Token > > ) -> Result {
203
190
let token = opt_nonnull_to_ptr ( token) ;
204
191
unsafe { ( self . 0 . flush_disk_ex ) ( & mut self . 0 , token. cast ( ) ) } . to_result ( )
0 commit comments