Skip to content

Commit 99fc5d7

Browse files
authored
Refactor disksnoop.py to remove logging and main block
Removed logging setup and main execution block from disksnoop.py.
1 parent c91e69e commit 99fc5d7

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

BCC-Examples/disksnoop.py

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
from pythonbpf import bpf, section, bpfglobal, compile_to_ir, compile, map
33
from pythonbpf.helper import ktime
44
from pythonbpf.maps import HashMap
5-
import logging
65
from ctypes import c_int64, c_uint64, c_int32
76

87
# Constants
@@ -55,7 +54,4 @@ def trace_start(ctx1: struct_pt_regs) -> c_int32:
5554
def LICENSE() -> str:
5655
return "GPL"
5756

58-
59-
if __name__ == "__main__":
60-
compile_to_ir("disksnoop.py", "disksnoop.ll", loglevel=logging.INFO)
61-
compile()
57+
compile()

0 commit comments

Comments
 (0)