License header fixes
[lttng-tools.git] / src / common / ust-consumer / ust-consumer.c
index c8ba084606180790b51fc7d11ba8ea5075f019c4..bfdb7e968fe9aa77ba9ad922e8fb6bf8748f4353 100644 (file)
@@ -2,19 +2,18 @@
  * Copyright (C) 2011 - Julien Desfossez <julien.desfossez@polymtl.ca>
  *                      Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
  *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; only version 2
- * of the License.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License, version 2 only,
+ * as published by the Free Software Foundation.
  *
  * This program is distributed in the hope that it will be useful,
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  * GNU General Public License for more details.
  *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
  */
 
 #define _GNU_SOURCE
@@ -59,7 +58,7 @@ ssize_t lttng_ustconsumer_on_read_subbuffer_mmap(
                stream->buf, &mmap_offset);
        if (ret != 0) {
                errno = -ret;
-               perror("ustctl_get_mmap_read_offset");
+               PERROR("ustctl_get_mmap_read_offset");
                goto end;
        }
        while (len > 0) {
@@ -68,7 +67,7 @@ ssize_t lttng_ustconsumer_on_read_subbuffer_mmap(
                        len = 0;
                } else if (ret < 0) {
                        errno = -ret;
-                       perror("Error in file write");
+                       PERROR("Error in file write");
                        goto end;
                }
                /* This won't block, but will start writeout asynchronously */
@@ -110,7 +109,7 @@ int lttng_ustconsumer_take_snapshot(struct lttng_consumer_local_data *ctx,
        ret = ustctl_snapshot(stream->chan->handle, stream->buf);
        if (ret != 0) {
                errno = -ret;
-               perror("Getting sub-buffer snapshot.");
+               PERROR("Getting sub-buffer snapshot.");
        }
 
        return ret;
@@ -132,7 +131,7 @@ int lttng_ustconsumer_get_produced_snapshot(
                        stream->buf, pos);
        if (ret != 0) {
                errno = -ret;
-               perror("kernctl_snapshot_get_produced");
+               PERROR("kernctl_snapshot_get_produced");
        }
 
        return ret;
@@ -261,7 +260,7 @@ end:
        /* signal the poll thread */
        ret = write(ctx->consumer_poll_pipe[1], "4", 1);
        if (ret < 0) {
-               perror("write consumer poll");
+               PERROR("write consumer poll");
        }
 end_nosignal:
        return 0;
@@ -401,7 +400,7 @@ int lttng_ustconsumer_on_recv_stream(struct lttng_consumer_stream *stream)
                                stream->uid, stream->gid);
                if (ret < 0) {
                        ERR("Opening %s", stream->path_name);
-                       perror("open");
+                       PERROR("open");
                        goto error;
                }
                stream->out_fd = ret;
This page took 0.024963 seconds and 4 git commands to generate.