diff options
Diffstat (limited to 'tools/lib/bpf/ringbuf.c')
| -rw-r--r-- | tools/lib/bpf/ringbuf.c | 8 | 
1 files changed, 7 insertions, 1 deletions
diff --git a/tools/lib/bpf/ringbuf.c b/tools/lib/bpf/ringbuf.c index 5c6522c89af1..8caaafe7e312 100644 --- a/tools/lib/bpf/ringbuf.c +++ b/tools/lib/bpf/ringbuf.c @@ -278,7 +278,13 @@ int ring_buffer__poll(struct ring_buffer *rb, int timeout_ms)  		err = ringbuf_process_ring(ring);  		if (err < 0)  			return err; -		res += cnt; +		res += err;  	}  	return cnt < 0 ? -errno : res;  } + +/* Get an fd that can be used to sleep until data is available in the ring(s) */ +int ring_buffer__epoll_fd(const struct ring_buffer *rb) +{ +	return rb->epoll_fd; +}  | 
