return lttng_kernel_counter_clear(counter, indexes);
}
default:
- WARN_ON_ONCE(1);
return -ENOSYS;
}
}
/* 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;
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;
}