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)
{
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);
/* Verify no newer features were requested */
if (validate_zero) {
- addr = (unsigned char*) def + map_sz_copy;
- end = (unsigned char*) def + map_sz_elf;
+ addr = (unsigned char *) def + map_sz_copy;
+ end = (unsigned char *) def + map_sz_elf;
for (; addr < end; addr++) {
if (*addr != 0) {
free(sym);