Skip to content

Commit

Permalink
improve debug messages
Browse files Browse the repository at this point in the history
  • Loading branch information
stlankes committed Mar 19, 2023
1 parent 4ada654 commit b96816c
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions src/fd/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -167,15 +167,15 @@ 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

0 comments on commit b96816c

Please sign in to comment.