mirror of
https://github.com/varun-r-mallya/Python-BPF.git
synced 2026-02-07 13:40:59 +00:00
BCC-Examples: Fix returns in disksnoop.py
This commit is contained in:
@ -27,7 +27,7 @@ def trace_completion(ctx: struct_pt_regs) -> c_int64:
|
|||||||
print(f"{data_len} {cmd_flags:x} {delta_us}\n")
|
print(f"{data_len} {cmd_flags:x} {delta_us}\n")
|
||||||
start.delete(req_ptr)
|
start.delete(req_ptr)
|
||||||
|
|
||||||
return c_int64(0)
|
return 0 # type: ignore [return-value]
|
||||||
|
|
||||||
|
|
||||||
@bpf
|
@bpf
|
||||||
@ -36,7 +36,7 @@ def trace_start(ctx1: struct_pt_regs) -> c_int32:
|
|||||||
req = ctx1.di
|
req = ctx1.di
|
||||||
ts = ktime()
|
ts = ktime()
|
||||||
start.update(req, ts)
|
start.update(req, ts)
|
||||||
return c_int32(0)
|
return 0 # type: ignore [return-value]
|
||||||
|
|
||||||
|
|
||||||
@bpf
|
@bpf
|
||||||
|
|||||||
Reference in New Issue
Block a user