summaryrefslogtreecommitdiffstats
path: root/vendor/rustix/src/io/read_write.rs
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/rustix/src/io/read_write.rs')
-rw-r--r--vendor/rustix/src/io/read_write.rs9
1 files changed, 8 insertions, 1 deletions
diff --git a/vendor/rustix/src/io/read_write.rs b/vendor/rustix/src/io/read_write.rs
index 1a4d37b65..d89ce7c7d 100644
--- a/vendor/rustix/src/io/read_write.rs
+++ b/vendor/rustix/src/io/read_write.rs
@@ -11,7 +11,6 @@ pub use backend::io::io_slice::{IoSlice, IoSliceMut};
#[cfg(feature = "std")]
pub use std::io::{IoSlice, IoSliceMut};
-/// `RWF_*` constants for use with [`preadv2`] and [`pwritev2`].
#[cfg(any(target_os = "android", target_os = "linux"))]
pub use backend::io::types::ReadWriteFlags;
@@ -62,6 +61,10 @@ pub fn pread<Fd: AsFd>(fd: Fd, buf: &mut [u8], offset: u64) -> io::Result<usize>
/// `pwrite(fd, bufs)`—Writes to a file at a given position.
///
+/// Contrary to POSIX, on many popular platforms including Linux and FreeBSD,
+/// if the file is opened in append mode, this ignores the offset appends the
+/// data to the end of the file.
+///
/// # References
/// - [POSIX]
/// - [Linux]
@@ -121,6 +124,10 @@ pub fn preadv<Fd: AsFd>(fd: Fd, bufs: &mut [IoSliceMut<'_>], offset: u64) -> io:
/// `pwritev(fd, bufs, offset)`—Writes to a file at a given position from
/// multiple buffers.
///
+/// Contrary to POSIX, on many popular platforms including Linux and FreeBSD,
+/// if the file is opened in append mode, this ignores the offset appends the
+/// data to the end of the file.
+///
/// # References
/// - [Linux]
///