Skip to content

Commit

Permalink
fix getcwd output fixes #7
Browse files Browse the repository at this point in the history
  • Loading branch information
sectordistrict committed Nov 12, 2024
1 parent 11da6ad commit d793dd8
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 8 deletions.
2 changes: 1 addition & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -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"
Expand Down
3 changes: 1 addition & 2 deletions src/one_line_formatter.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
5 changes: 2 additions & 3 deletions src/syscall_object.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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 => {
Expand Down Expand Up @@ -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}",
))
}
}
Expand Down
3 changes: 2 additions & 1 deletion src/syscalls_map.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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<Sysno, SysDetails> {
use ArgContainer::*;
Expand Down

0 comments on commit d793dd8

Please sign in to comment.