File tree Expand file tree Collapse file tree 1 file changed +27
-0
lines changed Expand file tree Collapse file tree 1 file changed +27
-0
lines changed Original file line number Diff line number Diff line change @@ -20,6 +20,33 @@ use macros::{pin_data, pinned_drop};
2020#[ cfg( CONFIG_BUFFER_HEAD ) ]
2121pub mod buffer;
2222
23+ /// Contains constants related to Linux file modes.
24+ pub mod mode {
25+ /// A bitmask used to the file type from a mode value.
26+ pub const S_IFMT : u32 = bindings:: S_IFMT ;
27+
28+ /// File type constant for block devices.
29+ pub const S_IFBLK : u32 = bindings:: S_IFBLK ;
30+
31+ /// File type constant for char devices.
32+ pub const S_IFCHR : u32 = bindings:: S_IFCHR ;
33+
34+ /// File type constant for directories.
35+ pub const S_IFDIR : u32 = bindings:: S_IFDIR ;
36+
37+ /// File type constant for pipes.
38+ pub const S_IFIFO : u32 = bindings:: S_IFIFO ;
39+
40+ /// File type constant for symbolic links.
41+ pub const S_IFLNK : u32 = bindings:: S_IFLNK ;
42+
43+ /// File type constant for regular files.
44+ pub const S_IFREG : u32 = bindings:: S_IFREG ;
45+
46+ /// File type constant for sockets.
47+ pub const S_IFSOCK : u32 = bindings:: S_IFSOCK ;
48+ }
49+
2350/// Maximum size of an inode.
2451pub const MAX_LFS_FILESIZE : i64 = bindings:: MAX_LFS_FILESIZE ;
2552
You can’t perform that action at this time.
0 commit comments