Skip to content

Commit 8c7cc59

Browse files
dependabot[bot]stefano-garzarella
authored andcommitted
build(deps): update nix requirement
Updates the requirements on [nix](https://github.com/nix-rust/nix) to permit the latest version. Updates `nix` to 0.30.1 - [Changelog](https://github.com/nix-rust/nix/blob/master/CHANGELOG.md) - [Commits](nix-rust/nix@v0.29.0...v0.30.1) --- updated-dependencies: - dependency-name: nix dependency-version: 0.30.1 dependency-type: direct:production dependency-group: vhost ... Signed-off-by: dependabot[bot] <[email protected]> [SG] adapted the memfd_create call to comply with the new nix v0.30 interface Signed-off-by: Stefano Garzarella <[email protected]>
1 parent 1e1ec87 commit 8c7cc59

File tree

2 files changed

+2
-7
lines changed

2 files changed

+2
-7
lines changed

vhost-user-backend/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ vm-memory = { workspace = true, features = ["backend-mmap", "backend-atomic", "b
2323
vmm-sys-util = { workspace = true }
2424

2525
[dev-dependencies]
26-
nix = { version = "0.29", features = ["fs"] }
26+
nix = { version = "0.30", features = ["fs"] }
2727
uuid = { version = "1.8.0", features=["v4"] }
2828
vhost = { path = "../vhost", version = "0.13.0", features = ["test-utils", "vhost-user-frontend", "vhost-user-backend"] }
2929
vm-memory = { workspace = true, features = ["backend-mmap", "backend-atomic"] }

vhost-user-backend/tests/vhost-user-server.rs

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
use std::ffi::CString;
21
use std::fs::File;
32
use std::io::Result;
43
use std::os::unix::io::AsRawFd;
@@ -166,11 +165,7 @@ fn vhost_user_client(path: &Path, barrier: Arc<Barrier>) {
166165
frontend.set_protocol_features(proto).unwrap();
167166
assert!(proto.contains(VhostUserProtocolFeatures::REPLY_ACK));
168167

169-
let memfd = nix::sys::memfd::memfd_create(
170-
&CString::new("test").unwrap(),
171-
nix::sys::memfd::MemFdCreateFlag::empty(),
172-
)
173-
.unwrap();
168+
let memfd = nix::sys::memfd::memfd_create("test", nix::sys::memfd::MFdFlags::empty()).unwrap();
174169
let file = File::from(memfd);
175170
file.set_len(0x100000).unwrap();
176171
let file_offset = FileOffset::new(file, 0);

0 commit comments

Comments
 (0)