forked from luck/tmp_suning_uos_patched
samples/bpf: fix a couple of style issues in bpf_load
This commit fixes a few style problems in samples/bpf/bpf_load.c: - Magic string use of 'DEBUGFS' - Useless zero initialization of a global variable - Minor style fix with whitespace Signed-off-by: Daniel T. Lee <danieltimlee@gmail.com> Acked-by: Yonghong Song <yhs@fb.com> Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
This commit is contained in:
parent
486d3f22c0
commit
37b54aed12
|
@ -40,7 +40,7 @@ int prog_cnt;
|
|||
int prog_array_fd = -1;
|
||||
|
||||
struct bpf_map_data map_data[MAX_MAPS];
|
||||
int map_data_count = 0;
|
||||
int map_data_count;
|
||||
|
||||
static int populate_prog_array(const char *event, int prog_fd)
|
||||
{
|
||||
|
@ -65,7 +65,7 @@ static int write_kprobe_events(const char *val)
|
|||
else
|
||||
flags = O_WRONLY | O_APPEND;
|
||||
|
||||
fd = open("/sys/kernel/debug/tracing/kprobe_events", flags);
|
||||
fd = open(DEBUGFS "kprobe_events", flags);
|
||||
|
||||
ret = write(fd, val, strlen(val));
|
||||
close(fd);
|
||||
|
|
Loading…
Reference in New Issue
Block a user