Add missing open() option to kconsumerd
authorDavid Goulet <david.goulet@polymtl.ca>
Fri, 27 May 2011 20:19:57 +0000 (16:19 -0400)
committerDavid Goulet <david.goulet@polymtl.ca>
Fri, 27 May 2011 20:19:57 +0000 (16:19 -0400)
From: Julien Desfossez <julien.desfossez@polymtl.ca>
Signed-off-by: David Goulet <david.goulet@polymtl.ca>
kconsumerd/kconsumerd.c

index f0ccb8c9e797a049141a1ba0fc131f70fe6d3197..8e8f1a6188c1b322449992fb4fd904218cb993a9 100644 (file)
@@ -156,7 +156,7 @@ static int add_fd(struct lttcomm_kconsumerd_msg *buf, int consumerd_fd)
        /* Opening the tracefile in write mode */
        DBG("Opening %s for writing", tmp_fd->path_name);
        ret = open(tmp_fd->path_name,
-                       O_WRONLY|O_CREAT, S_IRWXU|S_IRWXG|S_IRWXO);
+                       O_WRONLY|O_CREAT|O_TRUNC, S_IRWXU|S_IRWXG|S_IRWXO);
        if (ret < 0) {
                ERR("Opening %s", tmp_fd->path_name);
                perror("open");
This page took 0.034741 seconds and 4 git commands to generate.