From 61a5a1b7ea332b6e21935200a1324f7ba0f9e6f5 Mon Sep 17 00:00:00 2001 From: Stefan Lankes Date: Sun, 19 Mar 2023 16:35:09 +0100 Subject: [PATCH] improve debug messages --- src/fd/mod.rs | 21 ++++++++++++--------- 1 file changed, 12 insertions(+), 9 deletions(-) diff --git a/src/fd/mod.rs b/src/fd/mod.rs index 777459d8e0..17cb840e8c 100644 --- a/src/fd/mod.rs +++ b/src/fd/mod.rs @@ -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,