@@ -106,19 +106,28 @@ impl Statfs {
106
106
}
107
107
108
108
/// Optimal transfer block size
109
- #[ cfg( any( target_os = "ios" , target_os = "macos" , target_os = "openbsd" ) ) ]
109
+ #[ cfg( any( target_os = "ios" , target_os = "macos" ) ) ]
110
110
pub fn optimal_transfer_size ( & self ) -> i32 {
111
111
self . 0 . f_iosize
112
112
}
113
113
114
+ /// Optimal transfer block size
115
+ #[ cfg( target_os = "openbsd" ) ]
116
+ pub fn optimal_transfer_size ( & self ) -> u32 {
117
+ self . 0 . f_iosize
118
+ }
119
+
114
120
/// Optimal transfer block size
115
121
#[ cfg( all( target_os = "linux" , target_arch = "s390x" ) ) ]
116
122
pub fn optimal_transfer_size ( & self ) -> u32 {
117
123
self . 0 . f_bsize
118
124
}
119
125
120
126
/// Optimal transfer block size
121
- #[ cfg( all( target_os = "linux" , target_env = "musl" ) ) ]
127
+ #[ cfg( any(
128
+ target_os = "android" ,
129
+ all( target_os = "linux" , target_env = "musl" )
130
+ ) ) ]
122
131
pub fn optimal_transfer_size ( & self ) -> libc:: c_ulong {
123
132
self . 0 . f_bsize
124
133
}
@@ -129,12 +138,6 @@ impl Statfs {
129
138
self . 0 . f_bsize
130
139
}
131
140
132
- /// Optimal transfer block size
133
- #[ cfg( target_os = "android" ) ]
134
- pub fn optimal_transfer_size ( & self ) -> libc:: c_ulong {
135
- self . 0 . f_bsize
136
- }
137
-
138
141
/// Optimal transfer block size
139
142
#[ cfg( target_os = "dragonfly" ) ]
140
143
pub fn optimal_transfer_size ( & self ) -> libc:: c_long {
@@ -375,7 +378,13 @@ impl Statfs {
375
378
}
376
379
377
380
/// Free file nodes in filesystem
378
- #[ cfg( any( target_os = "ios" , target_os = "macos" , target_os = "android" ) ) ]
381
+ #[ cfg( any(
382
+ target_os = "android" ,
383
+ target_os = "ios" ,
384
+ all( target_os = "linux" , target_env = "musl" ) ,
385
+ target_os = "macos" ,
386
+ target_os = "openbsd"
387
+ ) ) ]
379
388
pub fn files_free ( & self ) -> u64 {
380
389
self . 0 . f_ffree
381
390
}
@@ -387,17 +396,11 @@ impl Statfs {
387
396
}
388
397
389
398
/// Free file nodes in filesystem
390
- #[ cfg( any ( target_os = "freebsd" , target_os = "openbsd" ) ) ]
399
+ #[ cfg( target_os = "freebsd" ) ]
391
400
pub fn files_free ( & self ) -> i64 {
392
401
self . 0 . f_ffree
393
402
}
394
403
395
- /// Free file nodes in filesystem
396
- #[ cfg( all( target_os = "linux" , target_env = "musl" ) ) ]
397
- pub fn files_free ( & self ) -> u64 {
398
- self . 0 . f_ffree
399
- }
400
-
401
404
/// Free file nodes in filesystem
402
405
#[ cfg( not( any(
403
406
target_os = "ios" ,
0 commit comments