-
Notifications
You must be signed in to change notification settings - Fork 666
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
FreeBSD: cfmakesane, EVFILT_* #825
Conversation
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 needs a CHANGELOG entry.
src/sys/event.rs
Outdated
@@ -39,6 +39,8 @@ libc_enum! { | |||
#[cfg_attr(not(target_os = "netbsd"), repr(i16))] | |||
pub enum EventFilter { | |||
EVFILT_AIO, | |||
#[cfg(target_os = "freebsd")] |
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.
Each one of these need doccomments describing them.
Thanks for your submission! Have you checked the other BSDs to see how many define these symbols too? I see that |
6c4e055
to
d550555
Compare
7ea2152
to
d550555
Compare
|
Ok. What about |
I have documented (hmm, none of the other values have been documented here before…) |
@myfreeweb Yes, there has been a severe lack of documentation within |
Yeah I'll write some docs there soon. + one more addition: fix for |
src/sys/event.rs
Outdated
@@ -51,7 +54,15 @@ libc_enum! { | |||
#[cfg(any(target_os = "ios", target_os = "macos"))] | |||
EVFILT_MACHPORT, | |||
EVFILT_PROC, | |||
/// Returns events associated with the process referenced by a given | |||
/// process descriptor, created by pdfork(2). The events to monitor are: |
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.
Backticks needed around pdfork()
(leave out the "2").
src/sys/event.rs
Outdated
EVFILT_READ, | ||
#[cfg(target_os = "freebsd")] | ||
EVFILT_SENDFILE, |
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.
@asomers Could you help us dig up some docs for this constant?
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.
How about "indicates the completion of an asynchronous sendfile(2)
call". I'm afraid be more specific than that.
src/sys/ioctl/mod.rs
Outdated
@@ -325,7 +325,7 @@ macro_rules! ioctl { | |||
pub unsafe fn $name(fd: $crate::libc::c_int, | |||
data: $crate::libc::c_int) | |||
-> $crate::Result<$crate::libc::c_int> { | |||
convert_ioctl_res!($crate::libc::ioctl(fd, iow!($ioty, $nr, ::std::mem::size_of::<$crate::libc::c_int>()) as $crate::sys::ioctl::ioctl_num_type, data)) | |||
convert_ioctl_res!($crate::libc::ioctl(fd, iowint!($ioty, $nr, ::std::mem::size_of::<$crate::libc::c_int>()) as $crate::sys::ioctl::ioctl_num_type, data)) |
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.
src/sys/termios.rs
Outdated
/// | ||
/// Note that this is a non-standard function, available on FreeBSD. | ||
#[cfg(target_os = "freebsd")] | ||
pub fn cfmakesane(termios: &mut Termios) { |
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.
This needs a link to the man pages.
4a042fe
to
589cc50
Compare
Removed the ioctl fix here, updated comments. rust-lang/libc#887 has landed, but not in a release yet. |
Please move the CHANGELOG entries into the |
589cc50
to
463511b
Compare
done |
Looks like it'll need another rebase to deal with changes to the CHANGELOG file. When you do please post back here, as I don't get an email on changes to PRs that aren't comments. |
463511b
to
647bac7
Compare
rebased |
Thanks for your contribution! bors r+ |
825: FreeBSD: cfmakesane, EVFILT_* r=Susurrus a=myfreeweb Depends on: rust-lang/libc#887
Depends on: rust-lang/libc#887