From 0efc6222753d9f318f796ee3b3aee2401b23cd66 Mon Sep 17 00:00:00 2001 From: Baitinq Date: Sat, 20 Jan 2024 20:10:31 +0100 Subject: Use common SyscallInfo enum to transfer data --- fs-tracer-common/src/lib.rs | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'fs-tracer-common/src') diff --git a/fs-tracer-common/src/lib.rs b/fs-tracer-common/src/lib.rs index 9be9774..7ed6d66 100644 --- a/fs-tracer-common/src/lib.rs +++ b/fs-tracer-common/src/lib.rs @@ -1,8 +1,11 @@ #![no_std] -use core::fmt::{Formatter, self}; +use core::fmt::{self, Formatter}; use core::str; +pub enum SyscallInfo { + Write(WriteSyscallBPF), +} #[derive(Clone, Copy)] pub struct WriteSyscallBPF { @@ -21,9 +24,9 @@ impl fmt::Debug for WriteSyscallBPF { f.debug_struct("WriteSyscallBPF") .field("pid", &self.pid) .field("fd", &self.fd) - .field("buf", &str::from_utf8(&self.buf).unwrap_or("") ) + .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