@@ -31,7 +31,9 @@ type fs_type_t = libc::c_ulong;
31
31
type fs_type_t = libc:: c_uint ;
32
32
#[ cfg( all( target_os = "linux" , target_env = "musl" ) ) ]
33
33
type fs_type_t = libc:: c_ulong ;
34
- #[ cfg( all( target_os = "linux" , not( any( target_arch = "s390x" , target_env = "musl" ) ) ) ) ]
34
+ #[ cfg( all( target_os = "linux" , target_env = "uclibc" ) ) ]
35
+ type fs_type_t = libc:: c_int ;
36
+ #[ cfg( all( target_os = "linux" , not( any( target_arch = "s390x" , target_env = "musl" , target_env = "uclibc" ) ) ) ) ]
35
37
type fs_type_t = libc:: __fsword_t ;
36
38
37
39
/// Describes the file system type as known by the operating system.
@@ -71,7 +73,7 @@ pub const EXT3_SUPER_MAGIC: FsType = FsType(libc::EXT3_SUPER_MAGIC as fs_type_t)
71
73
#[ cfg( all( target_os = "linux" , not( target_env = "musl" ) ) ) ]
72
74
#[ allow( missing_docs) ]
73
75
pub const EXT4_SUPER_MAGIC : FsType = FsType ( libc:: EXT4_SUPER_MAGIC as fs_type_t ) ;
74
- #[ cfg( all( target_os = "linux" , not( target_env = "musl" ) ) ) ]
76
+ #[ cfg( all( target_os = "linux" , not( any ( target_env = "musl" , target_env = "uclibc" ) ) ) ) ]
75
77
#[ allow( missing_docs) ]
76
78
pub const FUSE_SUPER_MAGIC : FsType = FsType ( libc:: FUSE_SUPER_MAGIC as fs_type_t ) ;
77
79
#[ cfg( all( target_os = "linux" , not( target_env = "musl" ) ) ) ]
@@ -192,12 +194,19 @@ impl Statfs {
192
194
}
193
195
194
196
/// Optimal transfer block size
195
- #[ cfg( all( target_os = "linux" , not( any( target_arch = "s390x" , target_env = "musl" ) ) ) ) ]
197
+ #[ cfg( all( target_os = "linux" , not( any( target_arch = "s390x" , target_env = "musl" , target_env = "uclibc" ) ) ) ) ]
196
198
#[ cfg_attr( docsrs, doc( cfg( all( ) ) ) ) ]
197
199
pub fn optimal_transfer_size ( & self ) -> libc:: __fsword_t {
198
200
self . 0 . f_bsize
199
201
}
200
202
203
+ /// Optimal transfer block size
204
+ #[ cfg( all( target_os = "linux" , target_env = "uclibc" ) ) ]
205
+ #[ cfg_attr( docsrs, doc( cfg( all( ) ) ) ) ]
206
+ pub fn optimal_transfer_size ( & self ) -> libc:: c_int {
207
+ self . 0 . f_bsize
208
+ }
209
+
201
210
/// Optimal transfer block size
202
211
#[ cfg( target_os = "dragonfly" ) ]
203
212
#[ cfg_attr( docsrs, doc( cfg( all( ) ) ) ) ]
@@ -237,7 +246,15 @@ impl Statfs {
237
246
238
247
/// Size of a block
239
248
// f_bsize on linux: https://github.com/torvalds/linux/blob/master/fs/nfs/super.c#L471
240
- #[ cfg( all( target_os = "linux" , not( any( target_arch = "s390x" , target_env = "musl" ) ) ) ) ]
249
+ #[ cfg( all( target_os = "linux" , target_env = "uclibc" ) ) ]
250
+ #[ cfg_attr( docsrs, doc( cfg( all( ) ) ) ) ]
251
+ pub fn block_size ( & self ) -> libc:: c_int {
252
+ self . 0 . f_bsize
253
+ }
254
+
255
+ /// Size of a block
256
+ // f_bsize on linux: https://github.com/torvalds/linux/blob/master/fs/nfs/super.c#L471
257
+ #[ cfg( all( target_os = "linux" , not( any( target_arch = "s390x" , target_env = "musl" , target_env = "uclibc" ) ) ) ) ]
241
258
#[ cfg_attr( docsrs, doc( cfg( all( ) ) ) ) ]
242
259
pub fn block_size ( & self ) -> libc:: __fsword_t {
243
260
self . 0 . f_bsize
@@ -286,7 +303,14 @@ impl Statfs {
286
303
}
287
304
288
305
/// Maximum length of filenames
289
- #[ cfg( all( target_os = "linux" , not( any( target_arch = "s390x" , target_env = "musl" ) ) ) ) ]
306
+ #[ cfg( all( target_os = "linux" , target_env = "uclibc" ) ) ]
307
+ #[ cfg_attr( docsrs, doc( cfg( all( ) ) ) ) ]
308
+ pub fn maximum_name_length ( & self ) -> libc:: c_int {
309
+ self . 0 . f_namelen
310
+ }
311
+
312
+ /// Maximum length of filenames
313
+ #[ cfg( all( target_os = "linux" , not( any( target_arch = "s390x" , target_env = "musl" , target_env = "uclibc" ) ) ) ) ]
290
314
#[ cfg_attr( docsrs, doc( cfg( all( ) ) ) ) ]
291
315
pub fn maximum_name_length ( & self ) -> libc:: __fsword_t {
292
316
self . 0 . f_namelen
0 commit comments