Skip to content

Commit

Permalink
Rename Flags:
Browse files Browse the repository at this point in the history
relates to nix-rust#317
  • Loading branch information
howjmay committed Aug 29, 2024
1 parent ae338df commit 83bfcb8
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
10 changes: 5 additions & 5 deletions src/sys/event.rs
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ libc_bitflags! {
/// Event flags. See the man page for details.
// There's no useful documentation we can write for the individual flags
// that wouldn't simply be repeating the man page.
pub struct EventFlag: type_of_event_flag {
pub struct EvFlags: type_of_event_flag {
#[allow(missing_docs)]
EV_ADD;
#[allow(missing_docs)]
Expand Down Expand Up @@ -347,7 +347,7 @@ impl KEvent {
pub fn new(
ident: uintptr_t,
filter: EventFilter,
flags: EventFlag,
flags: EvFlags,
fflags: FilterFlag,
data: intptr_t,
udata: intptr_t,
Expand Down Expand Up @@ -382,8 +382,8 @@ impl KEvent {

/// Flags control what the kernel will do when this event is added with
/// [`Kqueue::kevent`].
pub fn flags(&self) -> EventFlag {
EventFlag::from_bits(self.kevent.flags).unwrap()
pub fn flags(&self) -> EvFlags {
EvFlags::from_bits(self.kevent.flags).unwrap()
}

/// Filter-specific flags.
Expand Down Expand Up @@ -443,7 +443,7 @@ pub fn ev_set(
ev: &mut KEvent,
ident: usize,
filter: EventFilter,
flags: EventFlag,
flags: EvFlags,
fflags: FilterFlag,
udata: intptr_t,
) {
Expand Down
4 changes: 2 additions & 2 deletions src/sys/memfd.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ use crate::{NixPath, Result};

libc_bitflags!(
/// Options that change the behavior of [`memfd_create`].
pub struct MemFdCreateFlag: libc::c_uint {
pub struct MFdFlags: libc::c_uint {
/// Set the close-on-exec ([`FD_CLOEXEC`]) flag on the new file descriptor.
///
/// By default, the new file descriptor is set to remain open across an [`execve`]
Expand Down Expand Up @@ -85,7 +85,7 @@ libc_bitflags!(
#[inline] // Delays codegen, preventing linker errors with dylibs and --no-allow-shlib-undefined
pub fn memfd_create<P: NixPath + ?Sized>(
name: &P,
flags: MemFdCreateFlag,
flags: MFdFlags,
) -> Result<OwnedFd> {
let res = name.with_nix_path(|cstr| {
unsafe {
Expand Down

0 comments on commit 83bfcb8

Please sign in to comment.