Skip to content

Commit 886e70f

Browse files
author
Pat Hickey
authored
Merge pull request #47 from qwandor/bitflags
Update bitflags to 2.2.1.
2 parents 01a3c07 + b1541b1 commit 886e70f

File tree

4 files changed

+6
-1
lines changed

4 files changed

+6
-1
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
### Unreleased
22

33
- Added `Uffd::read_events` that can read multiple events from the userfaultfd file descriptor.
4+
- Updated `bitflags` dependency to `2.2.1`.
45

56
### 0.3.1 (2021-02-17)
67

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ repository = "https://github.com/bytecodealliance/userfaultfd-rs"
99
readme = "README.md"
1010

1111
[dependencies]
12-
bitflags = "1.0"
12+
bitflags = "2.2.1"
1313
cfg-if = "^1.0.0"
1414
libc = "0.2.65"
1515
nix = "0.26"

src/builder.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ cfg_if::cfg_if! {
88
if #[cfg(any(feature = "linux5_7", feature = "linux4_14"))] {
99
bitflags! {
1010
/// Used with `UffdBuilder` to determine which features are available in the current kernel.
11+
#[derive(Copy, Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
1112
pub struct FeatureFlags: u64 {
1213
const PAGEFAULT_FLAG_WP = raw::UFFD_FEATURE_PAGEFAULT_FLAG_WP;
1314
const EVENT_FORK = raw::UFFD_FEATURE_EVENT_FORK;
@@ -23,6 +24,7 @@ cfg_if::cfg_if! {
2324
} else {
2425
bitflags! {
2526
/// Used with `UffdBuilder` to determine which features are available in the current kernel.
27+
#[derive(Copy, Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
2628
pub struct FeatureFlags: u64 {
2729
const PAGEFAULT_FLAG_WP = raw::UFFD_FEATURE_PAGEFAULT_FLAG_WP;
2830
const EVENT_FORK = raw::UFFD_FEATURE_EVENT_FORK;

src/lib.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,7 @@ impl FromRawFd for Uffd {
7373

7474
bitflags! {
7575
/// The registration mode used when registering an address range with `Uffd`.
76+
#[derive(Copy, Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
7677
pub struct RegisterMode: u64 {
7778
/// Registers the range for missing page faults.
7879
const MISSING = raw::UFFDIO_REGISTER_MODE_MISSING;
@@ -359,6 +360,7 @@ impl Uffd {
359360

360361
bitflags! {
361362
/// Used with `UffdBuilder` and `Uffd::register()` to determine which operations are available.
363+
#[derive(Copy, Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
362364
pub struct IoctlFlags: u64 {
363365
const REGISTER = 1 << raw::_UFFDIO_REGISTER;
364366
const UNREGISTER = 1 << raw::_UFFDIO_UNREGISTER;

0 commit comments

Comments
 (0)