about summary refs log tree commit diff
path: root/fs-tracer-common
diff options
context:
space:
mode:
authorBaitinq <manuelpalenzuelamerino@gmail.com>2024-01-20 20:10:31 +0100
committerBaitinq <manuelpalenzuelamerino@gmail.com>2024-01-20 20:10:31 +0100
commit0efc6222753d9f318f796ee3b3aee2401b23cd66 (patch)
treec52ae2b3e89c613efe3c01f342f60d3e918d8886 /fs-tracer-common
parentCleanup (diff)
downloadfs-tracer-0efc6222753d9f318f796ee3b3aee2401b23cd66.tar.gz
fs-tracer-0efc6222753d9f318f796ee3b3aee2401b23cd66.tar.bz2
fs-tracer-0efc6222753d9f318f796ee3b3aee2401b23cd66.zip
Use common SyscallInfo enum to transfer data
Diffstat (limited to 'fs-tracer-common')
-rw-r--r--fs-tracer-common/src/lib.rs9
1 files changed, 6 insertions, 3 deletions
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
+}