Skip to content

Commit fe2eade

Browse files
authored
Update documentation for ReadFixed and WriteFixed (#276)
* update docs * remove extra docs * remove man page pointers
1 parent c49e72e commit fe2eade

File tree

1 file changed

+9
-11
lines changed

1 file changed

+9
-11
lines changed

src/opcode.rs

Lines changed: 9 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -227,23 +227,22 @@ opcode! {
227227
}
228228

229229
opcode! {
230-
/// Read from pre-mapped buffers that have been previously registered with
230+
/// Read from a file into a fixed buffer that has been previously registered with
231231
/// [`Submitter::register_buffers`](crate::Submitter::register_buffers).
232232
///
233233
/// The return values match those documented in the `preadv2(2)` man pages.
234234
#[derive(Debug)]
235235
pub struct ReadFixed {
236-
/// The `buf_index` is an index into an array of fixed buffers,
237-
/// and is only valid if fixed buffers were registered.
238236
fd: { impl sealed::UseFixed },
239237
buf: { *mut u8 },
240238
len: { u32 },
241239
buf_index: { u16 },
242240
;;
243-
offset: u64 = 0,
244241
ioprio: u16 = 0,
245-
/// specified for read operations, contains a bitwise OR of per-I/O flags,
246-
/// as described in the `preadv2(2)` man page.
242+
/// The offset of the file to read from.
243+
offset: u64 = 0,
244+
/// Specified for read operations, contains a bitwise OR of per-I/O flags, as described in
245+
/// the `preadv2(2)` man page.
247246
rw_flags: types::RwFlags = 0
248247
}
249248

@@ -271,23 +270,22 @@ opcode! {
271270
}
272271

273272
opcode! {
274-
/// Write to pre-mapped buffers that have been previously registered with
273+
/// Write to a file from a fixed buffer that have been previously registered with
275274
/// [`Submitter::register_buffers`](crate::Submitter::register_buffers).
276275
///
277276
/// The return values match those documented in the `pwritev2(2)` man pages.
278277
#[derive(Debug)]
279278
pub struct WriteFixed {
280-
/// The `buf_index` is an index into an array of fixed buffers,
281-
/// and is only valid if fixed buffers were registered.
282279
fd: { impl sealed::UseFixed },
283280
buf: { *const u8 },
284281
len: { u32 },
285282
buf_index: { u16 },
286283
;;
287284
ioprio: u16 = 0,
285+
/// The offset of the file to write to.
288286
offset: u64 = 0,
289-
/// specified for write operations, contains a bitwise OR of per-I/O flags,
290-
/// as described in the `preadv2(2)` man page.
287+
/// Specified for write operations, contains a bitwise OR of per-I/O flags, as described in
288+
/// the `pwritev2(2)` man page.
291289
rw_flags: types::RwFlags = 0
292290
}
293291

0 commit comments

Comments
 (0)