statedump: Add missing events-internal.h include
[lttng-modules.git] / src / lttng-abi.c
index 864df6fc41d5f1ab393e078ec4aaa5beb55477b9..b66d434f8216dcb9156adba814e229a620970bf7 100644 (file)
@@ -122,6 +122,7 @@ fd_error:
        return ret;
 }
 
+static
 void event_notifier_send_notification_work_wakeup(struct irq_work *entry)
 {
        struct lttng_event_notifier_group *event_notifier_group =
@@ -730,7 +731,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 +1017,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 +1097,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;
 }
 
@@ -2568,6 +2569,7 @@ long lttng_metadata_ioctl(struct file *file, unsigned int cmd, unsigned long arg
  *     @file: the file
  *     @wait: poll table
  */
+static
 unsigned int lttng_channel_poll(struct file *file, poll_table *wait)
 {
        struct lttng_kernel_channel_buffer *channel = file->private_data;
This page took 0.024462 seconds and 4 git commands to generate.