From 99fc5d75cc077068ad1769d78cbf177ed6b1af9d Mon Sep 17 00:00:00 2001 From: Pragyansh Chaturvedi <76248539+r41k0u@users.noreply.github.com> Date: Sun, 30 Nov 2025 04:53:53 +0530 Subject: [PATCH] Refactor disksnoop.py to remove logging and main block Removed logging setup and main execution block from disksnoop.py. --- BCC-Examples/disksnoop.py | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/BCC-Examples/disksnoop.py b/BCC-Examples/disksnoop.py index 4ef4d24..a068544 100644 --- a/BCC-Examples/disksnoop.py +++ b/BCC-Examples/disksnoop.py @@ -2,7 +2,6 @@ from vmlinux import struct_request, struct_pt_regs from pythonbpf import bpf, section, bpfglobal, compile_to_ir, compile, map from pythonbpf.helper import ktime from pythonbpf.maps import HashMap -import logging from ctypes import c_int64, c_uint64, c_int32 # Constants @@ -55,7 +54,4 @@ def trace_start(ctx1: struct_pt_regs) -> c_int32: def LICENSE() -> str: return "GPL" - -if __name__ == "__main__": - compile_to_ir("disksnoop.py", "disksnoop.ll", loglevel=logging.INFO) - compile() +compile()