mirror of
https://github.com/varun-r-mallya/Python-BPF.git
synced 2025-12-31 21:06:25 +00:00
Fix return in BCC-Examples
This commit is contained in:
@ -6,7 +6,7 @@ from ctypes import c_void_p, c_int64
|
|||||||
@section("tracepoint/syscalls/sys_enter_clone")
|
@section("tracepoint/syscalls/sys_enter_clone")
|
||||||
def hello_world(ctx: c_void_p) -> c_int64:
|
def hello_world(ctx: c_void_p) -> c_int64:
|
||||||
print("Hello, World!")
|
print("Hello, World!")
|
||||||
return c_int64(0)
|
return 0 # type: ignore [return-value]
|
||||||
|
|
||||||
|
|
||||||
@bpf
|
@bpf
|
||||||
|
|||||||
@ -6,7 +6,7 @@ from ctypes import c_void_p, c_int64
|
|||||||
@section("tracepoint/syscalls/sys_enter_clone")
|
@section("tracepoint/syscalls/sys_enter_clone")
|
||||||
def hello_world(ctx: c_void_p) -> c_int64:
|
def hello_world(ctx: c_void_p) -> c_int64:
|
||||||
print("Hello, World!")
|
print("Hello, World!")
|
||||||
return c_int64(0)
|
return 0 # type: ignore [return-value]
|
||||||
|
|
||||||
|
|
||||||
@bpf
|
@bpf
|
||||||
|
|||||||
@ -24,7 +24,7 @@ def do_trace(ctx: c_void_p) -> c_int64:
|
|||||||
last.delete(key)
|
last.delete(key)
|
||||||
else:
|
else:
|
||||||
last.update(key, ktime())
|
last.update(key, ktime())
|
||||||
return c_int64(0)
|
return 0 # type: ignore [return-value]
|
||||||
|
|
||||||
|
|
||||||
@bpf
|
@bpf
|
||||||
|
|||||||
Reference in New Issue
Block a user