Skip to content

Commit d16dfc4

Browse files
committed
Auto merge of #2364 - rtzoeller:dragonflybsd_fix_statfs, r=Amanieu
Fix statfs for DragonFlyBSD The statfs struct was missing several padding areas and used incorrect array lengths, causing all values to be incorrect. DragonFlyBSD's own documentation seems to be wrong here, which is likely how this ended up being incorrect in the first place. Source: https://github.com/DragonFlyBSD/DragonFlyBSD/blob/27ea30e396c40d8feb44d76002b79153e96ecf8f/sys/sys/mount.h#L95 Documentation: https://man.dragonflybsd.org/?command=statfs&section=2
2 parents 2b9253a + f09c62c commit d16dfc4

File tree

1 file changed

+8
-4
lines changed
  • src/unix/bsd/freebsdlike/dragonfly

1 file changed

+8
-4
lines changed

src/unix/bsd/freebsdlike/dragonfly/mod.rs

+8-4
Original file line numberDiff line numberDiff line change
@@ -247,6 +247,7 @@ s_no_extra_traits! {
247247
}
248248

249249
pub struct statfs {
250+
__spare2: ::c_long,
250251
pub f_bsize: ::c_long,
251252
pub f_iosize: ::c_long,
252253
pub f_blocks: ::c_long,
@@ -256,15 +257,18 @@ s_no_extra_traits! {
256257
pub f_ffree: ::c_long,
257258
pub f_fsid: ::fsid_t,
258259
pub f_owner: ::uid_t,
259-
pub f_type: i32,
260-
pub f_flags: i32,
260+
pub f_type: ::c_int,
261+
pub f_flags: ::c_int,
261262
pub f_syncwrites: ::c_long,
262263
pub f_asyncwrites: ::c_long,
263264
pub f_fstypename: [::c_char; 16],
264-
pub f_mntonname: [::c_char; 90],
265+
pub f_mntonname: [::c_char; 80],
265266
pub f_syncreads: ::c_long,
266267
pub f_asyncreads: ::c_long,
267-
pub f_mntfromname: [::c_char; 90],
268+
__spares1: ::c_short,
269+
pub f_mntfromname: [::c_char; 80],
270+
__spares2: ::c_short,
271+
__spare: [::c_long; 2],
268272
}
269273

270274
pub struct sigevent {

0 commit comments

Comments
 (0)