From dd8661bcb34fff507a53ebd24a39bbfb069336d9 Mon Sep 17 00:00:00 2001 From: 4lDO2 <4lDO2@protonmail.com> Date: Thu, 13 Jun 2024 15:59:08 +0200 Subject: [PATCH] Add debug print for SYS_READ2/SYS_WRITE2. --- src/syscall/debug.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/syscall/debug.rs b/src/syscall/debug.rs index 76315157cf..5cfdefab01 100644 --- a/src/syscall/debug.rs +++ b/src/syscall/debug.rs @@ -71,7 +71,9 @@ pub fn format_call(a: usize, b: usize, c: usize, d: usize, e: usize, f: usize) - ), SYS_SENDFD => format!("sendfd({}, {}, {:#0x} {:#0x} {:#0x})", b, c, d, e, f,), SYS_READ => format!("read({}, {:#X}, {})", b, c, d), + SYS_READ2 => format!("read2({}, {:#X}, {}, {}, {:?})", b, c, d, e, RwFlags::from_bits_retain(f as u32)), SYS_WRITE => format!("write({}, {:#X}, {})", b, c, d), + SYS_WRITE2 => format!("write2({}, {:#X}, {}, {}, {:?})", b, c, d, e, RwFlags::from_bits_retain(f as u32)), SYS_LSEEK => format!( "lseek({}, {}, {} ({}))", b, @@ -215,7 +217,7 @@ pub fn debug_start([a, b, c, d, e, f]: [usize; 6]) { let contexts = crate::context::contexts(); if let Some(context_lock) = contexts.current() { let context = context_lock.read(); - if context.name.contains("bootstrap") { + if context.name.contains("redoxfs") { if a == SYS_CLOCK_GETTIME || a == SYS_YIELD { false } else if (a == SYS_WRITE || a == SYS_FSYNC) && (b == 1 || b == 2) {