Skip to content

Commit a86a28e

Browse files
bors[bot]stlankes
andauthored
Merge #682
682: improve debug messages r=stlankes a=stlankes Co-authored-by: Stefan Lankes <slankes@eonerc.rwth-aachen.de>
2 parents caa59e1 + 61a5a1b commit a86a28e

File tree

1 file changed

+12
-9
lines changed

1 file changed

+12
-9
lines changed

src/fd/mod.rs

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -167,15 +167,18 @@ fn open_flags_to_perm(flags: i32, mode: u32) -> FilePerms {
167167
// mode is passed in as hex (0x777). Linux/Fuse expects octal (0o777).
168168
// just passing mode as is to FUSE create, leads to very weird permissions: 0b0111_0111_0111 -> 'r-x rwS rwt'
169169
// TODO: change in stdlib
170-
let mode =
171-
match mode {
172-
0x777 => 0o777,
173-
0 => 0,
174-
_ => {
175-
info!("Mode neither 777 nor 0, should never happen with current hermit stdlib! Using 777");
176-
0o777
177-
}
178-
};
170+
let mode = match mode {
171+
0x777 => 0o777,
172+
0o777 => 0o777,
173+
0 => 0,
174+
_ => {
175+
info!(
176+
"Mode {:#X} should never happen with current hermit stdlib! Using 777",
177+
mode
178+
);
179+
0o777
180+
}
181+
};
179182

180183
let mut perms = FilePerms {
181184
raw: flags as u32,

0 commit comments

Comments
 (0)