8
8
#![ deny( warnings) ]
9
9
10
10
use libc:: syscall;
11
- use libc:: { __s32 , __u16 , __u32 , __u64 , c_char, c_int , c_long , c_uint} ;
11
+ use libc:: { c_char, c_long , c_int , c_uint} ;
12
12
13
13
/// Timestamp structure for the timestamps in struct statx.
14
14
///
@@ -22,8 +22,8 @@ use libc::{__s32, __u16, __u32, __u64, c_char, c_int, c_long, c_uint};
22
22
#[ derive( Clone , Copy , Debug ) ]
23
23
pub struct statx_timestamp {
24
24
pub tv_sec : i64 ,
25
- pub tc_nsec : __u32 ,
26
- pub __reserved : __s32 ,
25
+ pub tv_nsec : u32 ,
26
+ pub __reserved : i32 ,
27
27
}
28
28
29
29
/// Structures for the extended file attribute retrieval system call
@@ -66,32 +66,32 @@ pub struct statx_timestamp {
66
66
pub struct statx {
67
67
// 0x00
68
68
/// What results were written [uncond]
69
- pub stx_mask : __u32 ,
69
+ pub stx_mask : u32 ,
70
70
/// Preferred general I/O size [uncond]
71
- pub stx_blksize : __u32 ,
71
+ pub stx_blksize : u32 ,
72
72
/// Flags conveying information about the file [uncond]
73
- pub stx_attributes : __u64 ,
73
+ pub stx_attributes : u64 ,
74
74
75
75
// 0x10
76
76
/// Number of hard links
77
- pub stx_nlink : __u32 ,
77
+ pub stx_nlink : u32 ,
78
78
/// User ID of owner
79
- pub stx_uid : __u32 ,
79
+ pub stx_uid : u32 ,
80
80
/// Group ID of owner
81
- pub stx_gid : __u32 ,
81
+ pub stx_gid : u32 ,
82
82
/// File mode
83
- pub stx_mode : __u16 ,
84
- pub __spare0 : [ __u16 ; 1 ] ,
83
+ pub stx_mode : u16 ,
84
+ pub __spare0 : [ u16 ; 1 ] ,
85
85
86
86
// 0x20
87
87
/// Inode number
88
- pub stx_ino : __u64 ,
88
+ pub stx_ino : u64 ,
89
89
/// File size
90
- pub stx_size : __u64 ,
90
+ pub stx_size : u64 ,
91
91
/// Number of 512-byte blocks allocated
92
- pub stx_blocks : __u64 ,
92
+ pub stx_blocks : u64 ,
93
93
/// Mask to show what's supported in stx_attributes
94
- pub stx_attributes_mask : __u64 ,
94
+ pub stx_attributes_mask : u64 ,
95
95
96
96
// 0x40
97
97
pub stx_atime : statx_timestamp , /* Last access time */
@@ -101,15 +101,15 @@ pub struct statx {
101
101
102
102
/* 0x80 */
103
103
/// Device ID of special file [if bdev/cdev]
104
- pub stx_rdev_major : __u32 ,
105
- pub stx_rdev_minor : __u32 ,
104
+ pub stx_rdev_major : u32 ,
105
+ pub stx_rdev_minor : u32 ,
106
106
/// ID of device containing file [uncond]
107
- pub stx_dev_major : __u32 ,
108
- pub stx_dev_minor : __u32 ,
107
+ pub stx_dev_major : u32 ,
108
+ pub stx_dev_minor : u32 ,
109
109
110
110
// 0x90
111
111
/// Spare space for future expansion
112
- pub __spare2 : [ __u64 ; 14 ] ,
112
+ pub __spare2 : [ u64 ; 14 ] ,
113
113
// 0x100
114
114
}
115
115
@@ -140,13 +140,13 @@ pub const STATX__RESERVED: c_uint = 0x8000_0000;
140
140
141
141
// File attributes.
142
142
143
- pub const STATX_ATTR_COMPRESSED : __u64 = 0x0000_0004 ;
144
- pub const STATX_ATTR_IMMUTABLE : __u64 = 0x0000_0010 ;
145
- pub const STATX_ATTR_APPEND : __u64 = 0x0000_0020 ;
146
- pub const STATX_ATTR_NODUMP : __u64 = 0x0000_0040 ;
147
- pub const STATX_ATTR_ENCRYPTED : __u64 = 0x0000_0800 ;
143
+ pub const STATX_ATTR_COMPRESSED : c_int = 0x0000_0004 ;
144
+ pub const STATX_ATTR_IMMUTABLE : c_int = 0x0000_0010 ;
145
+ pub const STATX_ATTR_APPEND : c_int = 0x0000_0020 ;
146
+ pub const STATX_ATTR_NODUMP : c_int = 0x0000_0040 ;
147
+ pub const STATX_ATTR_ENCRYPTED : c_int = 0x0000_0800 ;
148
148
149
- pub const STATX_ATTR_AUTOMOUNT : __u64 = 0x0000_1000 ;
149
+ pub const STATX_ATTR_AUTOMOUNT : c_int = 0x0000_1000 ;
150
150
151
151
/// statx - get file status (extended)
152
152
///
0 commit comments