diff options
Diffstat (limited to 'samples/bpf/bpf_load.c')
-rw-r--r-- | samples/bpf/bpf_load.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/samples/bpf/bpf_load.c b/samples/bpf/bpf_load.c index eae7b635343d..1734ade04f7f 100644 --- a/samples/bpf/bpf_load.c +++ b/samples/bpf/bpf_load.c | |||
@@ -40,7 +40,7 @@ int prog_cnt; | |||
40 | int prog_array_fd = -1; | 40 | int prog_array_fd = -1; |
41 | 41 | ||
42 | struct bpf_map_data map_data[MAX_MAPS]; | 42 | struct bpf_map_data map_data[MAX_MAPS]; |
43 | int map_data_count = 0; | 43 | int map_data_count; |
44 | 44 | ||
45 | static int populate_prog_array(const char *event, int prog_fd) | 45 | static int populate_prog_array(const char *event, int prog_fd) |
46 | { | 46 | { |
@@ -65,7 +65,7 @@ static int write_kprobe_events(const char *val) | |||
65 | else | 65 | else |
66 | flags = O_WRONLY | O_APPEND; | 66 | flags = O_WRONLY | O_APPEND; |
67 | 67 | ||
68 | fd = open("/sys/kernel/debug/tracing/kprobe_events", flags); | 68 | fd = open(DEBUGFS "kprobe_events", flags); |
69 | 69 | ||
70 | ret = write(fd, val, strlen(val)); | 70 | ret = write(fd, val, strlen(val)); |
71 | close(fd); | 71 | close(fd); |
@@ -490,8 +490,8 @@ static int load_elf_maps_section(struct bpf_map_data *maps, int maps_shndx, | |||
490 | 490 | ||
491 | /* Verify no newer features were requested */ | 491 | /* Verify no newer features were requested */ |
492 | if (validate_zero) { | 492 | if (validate_zero) { |
493 | addr = (unsigned char*) def + map_sz_copy; | 493 | addr = (unsigned char *) def + map_sz_copy; |
494 | end = (unsigned char*) def + map_sz_elf; | 494 | end = (unsigned char *) def + map_sz_elf; |
495 | for (; addr < end; addr++) { | 495 | for (; addr < end; addr++) { |
496 | if (*addr != 0) { | 496 | if (*addr != 0) { |
497 | free(sym); | 497 | free(sym); |