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