Skip to content

Commit dc46c98

Browse files
committed
remove workaround, which fix wrong file flags
- since rust-lang/rust#109368 the workaround isn't longer required
1 parent 0e4a69d commit dc46c98

File tree

1 file changed

+0
-17
lines changed

1 file changed

+0
-17
lines changed

src/fd/mod.rs

-17
Original file line numberDiff line numberDiff line change
@@ -164,23 +164,6 @@ fn uhyve_send<T>(port: u16, data: &mut T) {
164164
}
165165

166166
fn open_flags_to_perm(flags: i32, mode: u32) -> FilePerms {
167-
// mode is passed in as hex (0x777). Linux/Fuse expects octal (0o777).
168-
// just passing mode as is to FUSE create, leads to very weird permissions: 0b0111_0111_0111 -> 'r-x rwS rwt'
169-
// TODO: change in stdlib
170-
#[cfg(not(feature = "newlib"))]
171-
let mode = match mode {
172-
0x777 => 0o777,
173-
0o777 => 0o777,
174-
0 => 0,
175-
_ => {
176-
info!(
177-
"Mode {:#X} should never happen with current hermit stdlib! Using 0o777",
178-
mode
179-
);
180-
0o777
181-
}
182-
};
183-
184167
let mut perms = FilePerms {
185168
raw: flags as u32,
186169
mode,

0 commit comments

Comments
 (0)