Commit 82970a67 authored by yonghong-song's avatar yonghong-song Committed by GitHub

Merge pull request #1583 from liubogithub/urandomfix

Fix two issues in examples
parents 3c468a4f 7c34c05e
......@@ -14,7 +14,6 @@ from bcc import BPF
# load BPF program
b = BPF(text="""
#include <uapi/linux/ptrace.h>
#include <linux/blkdev.h>
BPF_HASH(last);
......
......@@ -33,7 +33,7 @@ struct urandom_read_args {
int printarg(struct urandom_read_args *args) {
bpf_trace_printk("%d\\n", args->got_bits);
return 0;
};
}
"""
# load BPF program
......
......@@ -20,7 +20,7 @@ TRACEPOINT_PROBE(random, urandom_read) {
// args is from /sys/kernel/debug/tracing/events/random/urandom_read/format
bpf_trace_printk("%d\\n", args->got_bits);
return 0;
};
}
""")
# header
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment