From: Julien Desfossez <julien.desfossez@polymtl.ca>
Signed-off-by: David Goulet <david.goulet@polymtl.ca>
/* Opening the tracefile in write mode */
DBG("Opening %s for writing", tmp_fd->path_name);
ret = open(tmp_fd->path_name,
/* 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");
if (ret < 0) {
ERR("Opening %s", tmp_fd->path_name);
perror("open");