Skip to content
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

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

Open
6 of 10 tasks
kamalmarhubi opened this issue Mar 16, 2016 · 4 comments · Fixed by #1024
Open
6 of 10 tasks

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

kamalmarhubi opened this issue Mar 16, 2016 · 4 comments · Fixed by #1024

Comments

@kamalmarhubi
Copy link
Member

kamalmarhubi commented Mar 16, 2016

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:

  • poll::EventFlags => PollFlags (1)
  • sys::epoll::EpollEventKind => EpollFlags (1)
  • sys::event::EventFlag => EvFlags
  • sys::event::FilterFlag => NoteFlags
  • sys::eventfd::EventFdFlag => EFdFlags
  • 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)
  • 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.

@Susurrus Susurrus added this to the 1.0 milestone Nov 5, 2017
bors bot added a commit that referenced this issue Feb 12, 2019
1024: Fix for #317 - Some event flags renaming r=asomers a=amanjeev

I tried to grep and replace for #317. Please let me know if I need to fix something else as well but in my search I saw that most were fixed earlier.

Co-authored-by: Amanjeev Sethi <[email protected]>
@amanjeev
Copy link
Contributor

I guess this can be closed as #1024 is merged?

@asomers
Copy link
Member

asomers commented Feb 12, 2019

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

@amanjeev
Copy link
Contributor

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

vdagonneau pushed a commit to vdagonneau/nix that referenced this issue Feb 20, 2019
Most of the EventFlags have been renamed already, but Poll was the only one remaining. This commit fixes that.

Issue 317 nix-rust#317
@palash25
Copy link

palash25 commented Oct 3, 2019

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

howjmay added a commit to howjmay/nix that referenced this issue Aug 29, 2024
howjmay added a commit to howjmay/nix that referenced this issue Oct 1, 2024
howjmay added a commit to howjmay/nix that referenced this issue Oct 1, 2024
howjmay added a commit to howjmay/nix that referenced this issue Oct 1, 2024
howjmay added a commit to howjmay/nix that referenced this issue Oct 1, 2024
github-merge-queue bot pushed a commit that referenced this issue Nov 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants