-
Notifications
You must be signed in to change notification settings - Fork 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
adding a handful of linux fanotify data types. #3695
Conversation
r? @JohnTitor rustbot has assigned @JohnTitor. Use |
d9c6f5a
to
6cc82b3
Compare
I think this looks good, but can you confirm that |
@rustbot author |
yes I confirm no presence in other libcs |
96bb2f7
to
8de6537
Compare
I think this should be @rustbot ready If you have a link to the headers / docs that would be great, trying to get them linked in every PR so we can find them again when needed. |
src/unix/linux_like/linux/align.rs
Outdated
#[repr(align(2))] | ||
pub struct fanotify_event_info_header { |
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.
https://github.com/torvalds/linux/blob/0c3836482481200ead7b416ca80c68a29cfdaabd/include/uapi/linux/fanotify.h#L153 doesn't seem to have an alignment attribute, and I think the default alignment should naturally be 16 bits. Why is it needed 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.
Also I think this would cause a problem building on ancient versions with alignment since this doesn't have a fallback
pub struct fanotify_event_info_pidfd { | ||
pub hdr: ::fanotify_event_info_header, | ||
pub pidfd: ::__s32, | ||
} | ||
|
||
pub struct fanotify_event_info_error { | ||
pub hdr: ::fanotify_event_info_header, | ||
pub error: ::__s32, | ||
pub error_count: ::__u32, | ||
} |
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.
Why are these GNU-only? I don't see them reexported in glibc, only uapi
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.
it s a bit of a mess on musl. with glibc it s enough to include sys/fanotify.h
which in turn include linux/fanotify.h
so you have all you need for this. in musl sys/fanotify.h
which does not include linux/fanotify.h
and if you do include both there are couple of type redefinition conflicts.
@rustbot author |
@rustbot review |
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.
Lgtm, could you squash please?
☔ The latest upstream changes (presumably #3480) made this pull request unmergeable. Please resolve the merge conflicts. |
close rust-lang#3688 (backport <rust-lang#3695>) (cherry picked from commit 7b338f9)
close rust-lang#3688 (backport <rust-lang#3695>) (cherry picked from commit 7b338f9)
close rust-lang#3688 (backport <rust-lang#3695>) (cherry picked from commit 7b338f9)
close #3688
here the involved struct
this one, this one and this one.