-
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
Add struct ctl_info #3046
Add struct ctl_info #3046
Conversation
Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @JohnTitor (or someone else) soon. Please see the contribution instructions for more information. |
Thanks! @bors r+ |
Add struct ctl_info Add the struct mentioned in #3045 Not sure if I should add `CTLIOCGINFO ` because it is wrapped in a macro: ```c #define CTLIOCGINFO _IOWR('N', 3, struct ctl_info) /* get id from name */ ``` The C definition of `ctl_info` is: ```c /*! * `@defined` MAX_KCTL_NAME * `@discussion` Kernel control names must be no longer than * MAX_KCTL_NAME. */ #define MAX_KCTL_NAME 96 /* * Controls destined to the Controller Manager. */ /*! * `@struct` ctl_info * `@discussion` This structure is used with the CTLIOCGINFO ioctl to * translate from a kernel control name to a control id. * `@field` ctl_id The kernel control id, filled out upon return. * `@field` ctl_name The kernel control name to find. */ struct ctl_info { u_int32_t ctl_id; /* Kernel Controller ID */ char ctl_name[MAX_KCTL_NAME]; /* Kernel Controller Name (a C string) */ }; ```
💔 Test failed - checks-actions |
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'd also be great if you could squash commits into one.
Could you squash commits into one to clean up the history? |
Sure, if you have trouble squash merging on your side. |
This repo uses bors and the bot only can merge PRs via merge commits. So you have to do that before merging. |
Squashed. |
👍, @bors r+ |
Add struct ctl_info Add the struct mentioned in #3045 Not sure if I should add `CTLIOCGINFO ` because it is wrapped in a macro: ```c #define CTLIOCGINFO _IOWR('N', 3, struct ctl_info) /* get id from name */ ``` The C definition of `ctl_info` is: ```c /*! * `@defined` MAX_KCTL_NAME * `@discussion` Kernel control names must be no longer than * MAX_KCTL_NAME. */ #define MAX_KCTL_NAME 96 /* * Controls destined to the Controller Manager. */ /*! * `@struct` ctl_info * `@discussion` This structure is used with the CTLIOCGINFO ioctl to * translate from a kernel control name to a control id. * `@field` ctl_id The kernel control id, filled out upon return. * `@field` ctl_name The kernel control name to find. */ struct ctl_info { u_int32_t ctl_id; /* Kernel Controller ID */ char ctl_name[MAX_KCTL_NAME]; /* Kernel Controller Name (a C string) */ }; ```
💔 Test failed - checks-actions |
💔 Test failed - checks-actions |
Still not working? |
I believe it's unrelated to this PR, let me investigate after my day job. |
rust-lang/crates.io#5929 should fix the issue, let's try out, @bors retry |
Add struct ctl_info Add the struct mentioned in #3045 Not sure if I should add `CTLIOCGINFO ` because it is wrapped in a macro: ```c #define CTLIOCGINFO _IOWR('N', 3, struct ctl_info) /* get id from name */ ``` The C definition of `ctl_info` is: ```c /*! * `@defined` MAX_KCTL_NAME * `@discussion` Kernel control names must be no longer than * MAX_KCTL_NAME. */ #define MAX_KCTL_NAME 96 /* * Controls destined to the Controller Manager. */ /*! * `@struct` ctl_info * `@discussion` This structure is used with the CTLIOCGINFO ioctl to * translate from a kernel control name to a control id. * `@field` ctl_id The kernel control id, filled out upon return. * `@field` ctl_name The kernel control name to find. */ struct ctl_info { u_int32_t ctl_id; /* Kernel Controller ID */ char ctl_name[MAX_KCTL_NAME]; /* Kernel Controller Name (a C string) */ }; ```
💔 Test failed - checks-actions |
I rebased the commit to the tip. |
The failure is valid:
1.19 cannot impl it and we have to use |
How about support >= 1.20 only? Updated. |
It will require 1.47, but it sounds good to me as I think it's old enough 👍 |
Sorry, I just saw this. Now I've changed the version to |
No worries, thanks! @bors r+ |
☀️ Test successful - checks-actions, checks-cirrus-freebsd-12, checks-cirrus-freebsd-13, checks-cirrus-freebsd-14 |
Add the struct mentioned in #3045
Not sure if I should add
CTLIOCGINFO
because it is wrapped in a macro:The C definition of
ctl_info
is: