Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 12 additions & 9 deletions src/fd/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -167,15 +167,18 @@ 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
let mode =
match mode {
0x777 => 0o777,
0 => 0,
_ => {
info!("Mode neither 777 nor 0, should never happen with current hermit stdlib! Using 777");
0o777
}
};
let mode = match mode {
0x777 => 0o777,
0o777 => 0o777,
0 => 0,
_ => {
info!(
"Mode {:#X} should never happen with current hermit stdlib! Using 777",
mode
);
0o777
}
};

let mut perms = FilePerms {
raw: flags as u32,
Expand Down