From d650d42dac5a9280747ac6741b770f7f3c5b9a50 Mon Sep 17 00:00:00 2001 From: Baitinq Date: Wed, 17 Jan 2024 00:33:15 +0100 Subject: Match syscall_enter and syscall_exits to get return value --- fs-tracer-common/src/lib.rs | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'fs-tracer-common') diff --git a/fs-tracer-common/src/lib.rs b/fs-tracer-common/src/lib.rs index 77ee0e5..9be9774 100644 --- a/fs-tracer-common/src/lib.rs +++ b/fs-tracer-common/src/lib.rs @@ -8,19 +8,22 @@ use core::str; pub struct WriteSyscallBPF { pub pid: u32, pub fd: u64, - pub buf: [u8; 128], + pub buf: [u8; 96], pub count: u64, + + pub ret: i64, } unsafe impl Sync for WriteSyscallBPF {} impl fmt::Debug for WriteSyscallBPF { fn fmt(&self, f: &mut Formatter<'_>) -> fmt::Result { - f.debug_struct("WriteSyscallArgs") + f.debug_struct("WriteSyscallBPF") .field("pid", &self.pid) .field("fd", &self.fd) .field("buf", &str::from_utf8(&self.buf).unwrap_or("") ) .field("count", &self.count) + .field("ret", &self.ret) .finish() } } \ No newline at end of file -- cgit 1.4.1