summaryrefslogtreecommitdiff
path: root/rust/kernel/debugfs/traits.rs
diff options
context:
space:
mode:
authorDanilo Krummrich <dakr@kernel.org>2025-10-22 16:30:39 +0200
committerDanilo Krummrich <dakr@kernel.org>2025-11-05 00:35:37 +0100
commit0ddceba2701e7012646f6df6d32c4e4b7c4dc938 (patch)
treee3c2a7d9e183e86e8c319eddacd746f236cc215d /rust/kernel/debugfs/traits.rs
parent86150533476774ee6ad5875e764ff6acc9a2e48a (diff)
rust: uaccess: add UserSliceWriter::write_slice_file()
Add UserSliceWriter::write_slice_file(), which is the same as UserSliceWriter::write_slice_partial() but updates the given file::Offset by the number of bytes written. This is equivalent to C's `simple_read_from_buffer()` and useful when dealing with file offsets from file operations. Reviewed-by: Alice Ryhl <aliceryhl@google.com> Acked-by: Miguel Ojeda <ojeda@kernel.org> [ Replace saturating_add() with the raw operator and a corresponding OVERFLOW comment. - Danilo ] Signed-off-by: Danilo Krummrich <dakr@kernel.org>
Diffstat (limited to 'rust/kernel/debugfs/traits.rs')
0 files changed, 0 insertions, 0 deletions