From: David Goulet Date: Fri, 27 May 2011 20:19:57 +0000 (-0400) Subject: Add missing open() option to kconsumerd X-Git-Tag: v2.0-pre1~103 X-Git-Url: https://git.lttng.org/?a=commitdiff_plain;ds=sidebyside;h=4625876527524eafaa15a55ddcb68258e8235dd7;p=lttng-tools.git Add missing open() option to kconsumerd From: Julien Desfossez Signed-off-by: David Goulet --- diff --git a/kconsumerd/kconsumerd.c b/kconsumerd/kconsumerd.c index f0ccb8c9e..8e8f1a618 100644 --- a/kconsumerd/kconsumerd.c +++ b/kconsumerd/kconsumerd.c @@ -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");