X-Git-Url: http://git.lttng.org./?a=blobdiff_plain;f=src%2Flttng-abi.c;h=9b1cceac0d99ce7bd2adc91356fc7fd64ec504bc;hb=2d45aeba7a3f5d738a5b22fe127c1eeaef048e70;hp=864df6fc41d5f1ab393e078ec4aaa5beb55477b9;hpb=7d42b129afc8e4a0a5a4172a8abb3022091b6440;p=lttng-modules.git diff --git a/src/lttng-abi.c b/src/lttng-abi.c index 864df6fc..9b1cceac 100644 --- a/src/lttng-abi.c +++ b/src/lttng-abi.c @@ -730,7 +730,6 @@ long lttng_counter_ioctl(struct file *file, unsigned int cmd, unsigned long arg) return lttng_kernel_counter_clear(counter, indexes); } default: - WARN_ON_ONCE(1); return -ENOSYS; } } @@ -1017,7 +1016,7 @@ ssize_t lttng_event_notifier_group_notif_read(struct file *filp, char __user *us /* Finish copy of previous record */ if (*ppos != 0) { - if (read_count < count) { + if (count != 0) { len = chan->iter.len_left; read_offset = *ppos; goto skip_get_next; @@ -1097,7 +1096,8 @@ nodata: chan->iter.len_left = 0; put_record: - lib_ring_buffer_put_current_record(buf); + if (*ppos == 0) + lib_ring_buffer_put_current_record(buf); return read_count; }