mirror of
https://github.com/torvalds/linux.git
synced 2026-03-08 01:04:41 +01:00
rust: fs: add file::Offset type alias
Add a type alias for file offsets, i.e. bindings::loff_t. Trying to avoid using raw bindings types, this seems to be the better alternative compared to just using i64. Cc: Alexander Viro <viro@zeniv.linux.org.uk> Cc: Christian Brauner <brauner@kernel.org> Cc: Jan Kara <jack@suse.cz> Reviewed-by: Alice Ryhl <aliceryhl@google.com> Reviewed-by: Christian Brauner <brauner@kernel.org> Link: https://patch.msgid.link/20251020222722.240473-2-dakr@kernel.org Signed-off-by: Danilo Krummrich <dakr@kernel.org>
This commit is contained in:
parent
46f045db5a
commit
db7bd1affa
1 changed files with 5 additions and 0 deletions
|
|
@ -17,6 +17,11 @@ use crate::{
|
|||
};
|
||||
use core::ptr;
|
||||
|
||||
/// Primitive type representing the offset within a [`File`].
|
||||
///
|
||||
/// Type alias for `bindings::loff_t`.
|
||||
pub type Offset = bindings::loff_t;
|
||||
|
||||
/// Flags associated with a [`File`].
|
||||
pub mod flags {
|
||||
/// File is opened in append mode.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue