Skip to content

Commit 05a11f7

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

File tree

3 files changed

+22
-10
lines changed

3 files changed

+22
-10
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: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,13 +28,13 @@ 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()),
31+
let mounts_fd = openat(
32+
&proc_dir,
3333
"mounts",
3434
OFlag::O_RDONLY,
3535
Mode::empty(),
3636
)?;
37-
let mounts = unsafe { File::from_raw_fd(mounts_raw) };
37+
let mounts = unsafe { File::from_raw_fd(mounts_fd.as_raw_fd()) };
3838

3939
let reader = BufReader::new(mounts);
4040

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

70-
fchdir(tmp_dir.as_raw_fd())?;
70+
fchdir(&tmp_dir)?;
7171
move_recursively(Path::new("/"), Path::new("."))?;
7272

7373
mount(

0 commit comments

Comments
 (0)