From ef6b736bb2eab5fbe66ccc06950512c7e19207a6 Mon Sep 17 00:00:00 2001 From: Stefan Lankes Date: Sun, 9 Apr 2023 18:31:14 +0200 Subject: [PATCH] remove workaround, which fix wrong file flags - since rust-lang/rust#109368 the workaround isn't longer required --- src/fd/mod.rs | 17 ----------------- 1 file changed, 17 deletions(-) diff --git a/src/fd/mod.rs b/src/fd/mod.rs index 97f9086b57..6bd16cc316 100644 --- a/src/fd/mod.rs +++ b/src/fd/mod.rs @@ -164,23 +164,6 @@ fn uhyve_send(port: u16, data: &mut T) { } fn open_flags_to_perm(flags: i32, mode: u32) -> FilePerms { - // mode is passed in as hex (0x777). Linux/Fuse expects octal (0o777). - // just passing mode as is to FUSE create, leads to very weird permissions: 0b0111_0111_0111 -> 'r-x rwS rwt' - // TODO: change in stdlib - #[cfg(not(feature = "newlib"))] - let mode = match mode { - 0x777 => 0o777, - 0o777 => 0o777, - 0 => 0, - _ => { - info!( - "Mode {:#X} should never happen with current hermit stdlib! Using 0o777", - mode - ); - 0o777 - } - }; - let mut perms = FilePerms { raw: flags as u32, mode,