-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix statfs for DragonFlyBSD #2364
Conversation
struct was missing several padded areas, causing all values to be wrong.
r? @Amanieu (rust-highfive has picked a reviewer for you, use r? to override) |
pub f_syncwrites: ::c_long, | ||
pub f_asyncwrites: ::c_long, | ||
pub f_fstypename: [::c_char; 16], | ||
pub f_mntonname: [::c_char; 90], | ||
pub f_mntonname: [::c_char; 80], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we have constants that we could use here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The C source defines MFSNAMELEN
and MNAMELEN
, but I don't see any equivalents in rust's libc. I can add these as constants if you'd prefer.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You're right, none of the other targets use a constant. I guess it's fine as it is.
@bors r+ |
📌 Commit f09c62c has been approved by |
☀️ Test successful - checks-actions, checks-cirrus-freebsd-11, checks-cirrus-freebsd-12, checks-cirrus-freebsd-13 |
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§ion=2