diff --git a/eBPF_Supermarket/Filesystem_Subsystem/fs_watcher/write.bpf.c b/eBPF_Supermarket/Filesystem_Subsystem/fs_watcher/write.bpf.c index afd1ad244..2fd33b8e6 100644 --- a/eBPF_Supermarket/Filesystem_Subsystem/fs_watcher/write.bpf.c +++ b/eBPF_Supermarket/Filesystem_Subsystem/fs_watcher/write.bpf.c @@ -54,5 +54,6 @@ int BPF_KPROBE(vfs_write) e->pid = pid; } bpf_ringbuf_submit(e,0); + return 0; } diff --git a/eBPF_Supermarket/Filesystem_Subsystem/fs_watcher/write.c b/eBPF_Supermarket/Filesystem_Subsystem/fs_watcher/write.c index cfda09d1a..335de457d 100644 --- a/eBPF_Supermarket/Filesystem_Subsystem/fs_watcher/write.c +++ b/eBPF_Supermarket/Filesystem_Subsystem/fs_watcher/write.c @@ -28,7 +28,7 @@ static int write_event(void *ctx, void *data, size_t data_sz) time(&t); tm = localtime(&t); strftime(ts, sizeof(ts), "%H:%M:%S", tm); - printf("%-8s %-7ld %-7ld\n", ts, e->pid,e->fd); + printf("%-8s %-7ld %-7ld\n", ts, e->pid,e->fd); return 0; } @@ -36,7 +36,7 @@ int main(int argc, char **argv) { struct ring_buffer *rb = NULL; struct write_bpf *skel; - int err; + int err; /* Set up libbpf errors and debug info callback */ libbpf_set_print(libbpf_print_fn);