Skip to content

Commit 7134192

Browse files
d-e-s-odanielocfb
authored andcommitted
Revert "Bump bitflags to 2.0"
This change reverts commit dd02117. The original change is backwards compatibility breaking (because MapFlags.bits got turned from a field into a method) and we want to cut another minor release to get commit f62153b ("Implement Default for struct containing pointers") and 6e47690 ("Fix handling of function prototype type declaration inference in BTF") out. We will re-land the change after release. Signed-off-by: Daniel Müller <[email protected]>
1 parent a349885 commit 7134192

File tree

4 files changed

+6
-8
lines changed

4 files changed

+6
-8
lines changed

Cargo.lock

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

libbpf-rs/CHANGELOG.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ Unreleased
22
----------
33
- Enabled key iteration on `MapHandle` objects (formerly possible only on `Map`
44
objects)
5-
- Updated `bitflags` dependency to `2.0`
65
- Bumped minimum Rust version to `1.64`
76

87

libbpf-rs/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ novendor = ["libbpf-sys/novendor"]
2121
static = ["libbpf-sys/static"]
2222

2323
[dependencies]
24-
bitflags = "2.0"
24+
bitflags = "1.3"
2525
lazy_static = "1.4"
2626
libbpf-sys = { version = "1.0.3" }
2727
libc = "0.2"

libbpf-rs/src/map.rs

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -549,7 +549,7 @@ impl MapHandle {
549549
self.fd.as_raw_fd(),
550550
self.map_key(key),
551551
out.as_mut_ptr() as *mut c_void,
552-
flags.bits(),
552+
flags.bits,
553553
)
554554
};
555555

@@ -584,7 +584,7 @@ impl MapHandle {
584584
self.fd.as_raw_fd(),
585585
self.map_key(key),
586586
value.as_ptr() as *const c_void,
587-
flags.bits(),
587+
flags.bits,
588588
)
589589
};
590590

@@ -675,8 +675,8 @@ impl MapHandle {
675675

676676
let opts = libbpf_sys::bpf_map_batch_opts {
677677
sz: mem::size_of::<libbpf_sys::bpf_map_batch_opts>() as _,
678-
elem_flags: elem_flags.bits(),
679-
flags: flags.bits(),
678+
elem_flags: elem_flags.bits,
679+
flags: flags.bits,
680680
};
681681

682682
let mut count = count;
@@ -853,7 +853,6 @@ impl AsFd for MapHandle {
853853

854854
bitflags! {
855855
/// Flags to configure [`Map`] operations.
856-
#[derive(PartialEq, Eq, PartialOrd, Ord, Hash, Debug, Clone, Copy)]
857856
pub struct MapFlags: u64 {
858857
/// See [`libbpf_sys::BPF_ANY`].
859858
const ANY = libbpf_sys::BPF_ANY as _;

0 commit comments

Comments
 (0)