From af98a1d00f01e1acfd73c8465f13a9bf144dd23b Mon Sep 17 00:00:00 2001 From: Brendan Gregg Date: Sun, 24 Jul 2016 16:19:20 -0700 Subject: [PATCH] return 0 on hello_worlds --- README.md | 2 +- examples/hello_world.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 97815bc..63cd5b5 100644 --- a/README.md +++ b/README.md @@ -189,7 +189,7 @@ The BPF program always takes at least one argument, which is a pointer to the context for this type of program. Different program types have different calling conventions, but for this one we don't care so `void *` is fine. ```python -BPF(text='void kprobe__sys_clone(void *ctx) { bpf_trace_printk("Hello, World!\\n"); }').trace_print() +BPF(text='int kprobe__sys_clone(void *ctx) { bpf_trace_printk("Hello, World!\\n"); return 0; }').trace_print() ``` For this example, we will call the program every time `fork()` is called by a diff --git a/examples/hello_world.py b/examples/hello_world.py index 13c6eb0..c23ed1c 100755 --- a/examples/hello_world.py +++ b/examples/hello_world.py @@ -8,4 +8,4 @@ from bcc import BPF -BPF(text='void kprobe__sys_clone(void *ctx) { bpf_trace_printk("Hello, World!\\n"); }').trace_print() +BPF(text='int kprobe__sys_clone(void *ctx) { bpf_trace_printk("Hello, World!\\n"); return 0; }').trace_print() -- 2.7.4