diff --git a/Cargo.lock b/Cargo.lock index fb1200e..b998694 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -230,7 +230,7 @@ dependencies = [ [[package]] name = "intentrace" -version = "0.2.4" +version = "0.2.5" dependencies = [ "clone3", "colored", diff --git a/Cargo.toml b/Cargo.toml index ece5b83..19be55b 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "intentrace" -version = "0.2.4" +version = "0.2.5" description = "intentrace is strace with intent, it goes all the way for you instead of half the way." edition = "2021" license = "MIT" diff --git a/src/one_line_formatter.rs b/src/one_line_formatter.rs index cc1ac0f..8556770 100644 --- a/src/one_line_formatter.rs +++ b/src/one_line_formatter.rs @@ -2148,8 +2148,7 @@ impl SyscallObject { if eph_return.is_ok() { self.one_line.push(" |=> ".white()); self.one_line.push("cwd: ".green()); - let target = self.pavfol(0); - self.one_line.push(target.yellow()); + self.one_line.push(eph_return.unwrap().yellow()); } else { // TODO! granular one_line_error(eph_return, &mut self.one_line, &self.errno); diff --git a/src/syscall_object.rs b/src/syscall_object.rs index aaaf3d0..0262037 100644 --- a/src/syscall_object.rs +++ b/src/syscall_object.rs @@ -500,7 +500,7 @@ impl SyscallObject { .to_string() .red()); } else { - format!("{pointer:p} , {register_value}-> {current_working_dir}").yellow() + format!("{current_working_dir}").yellow() } } Always_Successful_User_Group => { @@ -717,9 +717,8 @@ impl SyscallObject { if pointer.is_null() { Err(()) } else { - let len = current_working_dir.len(); Ok(format!( - "{pointer:p} , {register_value}-> {current_working_dir}", + "{current_working_dir}", )) } } diff --git a/src/syscalls_map.rs b/src/syscalls_map.rs index 2fe96a0..135e060 100644 --- a/src/syscalls_map.rs +++ b/src/syscalls_map.rs @@ -3,11 +3,12 @@ use syscalls::Sysno; use std::mem::MaybeUninit; use crate::types::{ArgContainer, SysArg, Category, Flag, SysDetails, SysReturn}; -// TODO! differenciate between bitflags (orables) and enums +// TODO! differentiate between bitflags (orables) and enums // TODO! add granularity for value-return type of syscall arguments // these are semantics for syscall arguments that get modified after syscall return // see if some arguments are better combined, like the very common buffer and buffer lengths (this makes processing cleaner but might result in complexity in non-conforming cases) // clarify whether a buffer is provided by the user or to be filled by the kernel in the name of the argument (GIVE vs FILL) +// switch to MaybeUninit pub fn initialize_syscall_map() -> HashMap { use ArgContainer::*;