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
Add all definitions from linux/ptp-clock.h #3559
base: libc-0.2
Are you sure you want to change the base?
Conversation
r? @JohnTitor (rustbot has picked a reviewer for you, use r? to override) |
b8f48dc
to
543faf9
Compare
(struct_ == "user_regs" && arm) || | ||
// `anonymous_1` is an anonymous union | ||
(struct_ == "ptp_perout_request" && field == "anonymous_1") || | ||
// `anonymous_2` is an anonymous union | ||
(struct_ == "ptp_perout_request" && field == "anonymous_2") |
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.
I'm not sure why but both this and block and the block above excluding these fields seem required for CI to be satisfied?!
543faf9
to
c57f452
Compare
Could you resolve CI failure? |
b778e8f
to
5ac4d4f
Compare
well that was more work that expected. A bunch of the constants and one struct are defined only in newer kernel versions (this causes problems on the 0.2 branch on musl, which uses an older kernel version)
and then on powerpc a bunch of the constants have different values. |
pub const PTP_CLOCK_GETCAPS: ::c_uint = 0x40503d01; | ||
pub const PTP_EXTTS_REQUEST: ::c_uint = 0x80103d02; | ||
pub const PTP_PEROUT_REQUEST: ::c_uint = 0x80383d03; | ||
pub const PTP_ENABLE_PPS: ::c_uint = 0x80043d04; | ||
pub const PTP_SYS_OFFSET: ::c_uint = 0x83403d05; | ||
pub const PTP_PIN_GETFUNC: ::c_uint = 0xc0603d06; | ||
pub const PTP_PIN_SETFUNC: ::c_uint = 0x80603d07; | ||
pub const PTP_SYS_OFFSET_PRECISE: ::c_uint = 0xc0403d08; |
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.
these are defined with some macros. There are rust versions here https://github.com/torvalds/linux/blob/8a696a29c6905594e4abf78eaafcb62165ac61f1/rust/kernel/ioctl.rs#L13
should those be used instead?
35841d1
to
d9c8b36
Compare
d9c8b36
to
b087c94
Compare
@JohnTitor this is actually waiting for review, but I don't think I can update the label? (not sure how this workflow is supposed to work?) |
ah, rustbot got more helpful in newer PRs @rustbot review |
I've taken over this change from @davidv1992 (who is my colleague). #3353 is the original PR which can now be closed.
I'm also assuming this can/should be merged into the libc-0.2 branch (and main will be rebased on top of that at some point?).