mirror of
https://github.com/varun-r-mallya/Python-BPF.git
synced 2026-02-07 21:50:55 +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")
|
||||
start.delete(req_ptr)
|
||||
|
||||
return c_int64(0)
|
||||
return 0 # type: ignore [return-value]
|
||||
|
||||
|
||||
@bpf
|
||||
@ -36,7 +36,7 @@ def trace_start(ctx1: struct_pt_regs) -> c_int32:
|
||||
req = ctx1.di
|
||||
ts = ktime()
|
||||
start.update(req, ts)
|
||||
return c_int32(0)
|
||||
return 0 # type: ignore [return-value]
|
||||
|
||||
|
||||
@bpf
|
||||
|
||||
Reference in New Issue
Block a user