Skip to content

Commit b43384e

Browse files
committed
Bump nix crate to 0.30.1
Signed-off-by: Guvenc Gulce <[email protected]>
1 parent 5c0ff8c commit b43384e

File tree

3 files changed

+21
-14
lines changed

3 files changed

+21
-14
lines changed

Cargo.lock

Lines changed: 17 additions & 5 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ tonic = "0.13.0"
2121
prost = "0.13.5"
2222
prost-types = "0.13.5"
2323
anyhow = "1.0.100"
24-
nix = { version = "0.29.0", features = ["mount", "user", "reboot", "feature", "net", "aio", "signal", "process", "fs", "hostname"] }
24+
nix = { version = "0.30.1", features = ["mount", "user", "reboot", "feature", "net", "aio", "signal", "process", "fs", "hostname"] }
2525
serde = { version = "1.0", features = ["derive"] }
2626
serde_json = "1.0.132"
2727
uuid = { version = "1.18.1", features = ["v4"] }

feos/utils/src/filesystem/move.rs

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -28,13 +28,8 @@ pub fn get_root_fstype() -> Result<String, Box<dyn std::error::Error>> {
2828
let proc_dir_raw = fsmount(proc_fs.as_fd(), 0, 0)?;
2929
let proc_dir = unsafe { OwnedFd::from_raw_fd(proc_dir_raw) };
3030

31-
let mounts_raw = openat(
32-
Some(proc_dir.as_raw_fd()),
33-
"mounts",
34-
OFlag::O_RDONLY,
35-
Mode::empty(),
36-
)?;
37-
let mounts = unsafe { File::from_raw_fd(mounts_raw) };
31+
let mounts_fd = openat(&proc_dir, "mounts", OFlag::O_RDONLY, Mode::empty())?;
32+
let mounts = unsafe { File::from_raw_fd(mounts_fd.as_raw_fd()) };
3833

3934
let reader = BufReader::new(mounts);
4035

@@ -67,7 +62,7 @@ pub fn move_root() -> Result<(), Box<dyn std::error::Error>> {
6762
let tmp_dir_raw = fsmount(tmp_fs.as_fd(), 0, 0)?;
6863
let tmp_dir = unsafe { OwnedFd::from_raw_fd(tmp_dir_raw) };
6964

70-
fchdir(tmp_dir.as_raw_fd())?;
65+
fchdir(&tmp_dir)?;
7166
move_recursively(Path::new("/"), Path::new("."))?;
7267

7368
mount(

0 commit comments

Comments
 (0)