nix icon indicating copy to clipboard operation
nix copied to clipboard

Fix flag type names to match FOO_* => FooFlags convention

Open kamalmarhubi opened this issue 9 years ago • 4 comments
trafficstars

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 => use sys::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.

kamalmarhubi avatar Mar 16 '16 17:03 kamalmarhubi

I guess this can be closed as https://github.com/nix-rust/nix/pull/1024 is merged?

amanjeev avatar Feb 12 '19 23:02 amanjeev

Some of the other types haven't been changed yet, though.

asomers avatar Feb 12 '19 23:02 asomers

@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.

amanjeev avatar Feb 13 '19 00:02 amanjeev

Hi :wave: I made a PR for sys::event can someone please review it.

palash25 avatar Oct 03 '19 18:10 palash25