nix
nix copied to clipboard
Fix flag type names to match FOO_* => FooFlags convention
The convention was added in #287, and there are a few places that need changing. I'm going through all the bitflags as part of #315, and noticing them. Here's a (partial) list:
- [x]
poll::EventFlags=>PollFlags(1) - [x]
sys::epoll::EpollEventKind=>EpollFlags(1) - [x]
sys::event::EventFlag=>EvFlags - [ ]
sys::event::FilterFlag=>NoteFlags - [x]
sys::eventfd::EventFdFlag=>EFdFlags - [x]
sys::memfd::MemFdCreateFlag=>MFdFlags - [ ]
sys::quota::QuotaValidFlags=>QIFFlags(unsure about capitalization) - [ ]
sys::stat::{SFlag, Mode}=>SFlags? (2) - [ ]
sys::statvfs::FsFlags=> usesys::mount::MsFlags? (3) - [x]
sys::termios::{InputFlags, OutputFlags, ControlFlags, LocalFlags}=> ? (4)
(1) these might need amending the convention. The flags are named POLLIN, POLLOUT, EPOLLIN, EPOLLOUT, etc: there is no underscore
(2) these are used in different parameters; needs to looked at a bit more carefully
(3) man page for statvfs(2) says
The field f_flag is a bit mask (of mount flags, see mount(8)).
(4) These flags have no common prefix.
I guess this can be closed as https://github.com/nix-rust/nix/pull/1024 is merged?
Some of the other types haven't been changed yet, though.
@asomers oh let me see which ones. Sorry I missed those. If you can point me to some other, I'd be glad to change those as well. It will give me some way to peruse through the source.
Hi :wave: I made a PR for sys::event can someone please review it.