From 3357d3607442bf3047a4862d0368ea039bc2dba8 Mon Sep 17 00:00:00 2001 From: compudj Date: Mon, 13 Jun 2005 17:54:42 +0000 Subject: [PATCH] lttd daemon complete git-svn-id: http://ltt.polymtl.ca/svn@948 04897980-b3bd-0310-b5e0-8ef037075253 --- ltt/branches/poly/lttd/lttd.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/ltt/branches/poly/lttd/lttd.c b/ltt/branches/poly/lttd/lttd.c index e090729..ebd8a2d 100644 --- a/ltt/branches/poly/lttd/lttd.c +++ b/ltt/branches/poly/lttd/lttd.c @@ -194,8 +194,6 @@ int open_channel_trace_pairs(char *subchannel_name, char *subtrace_name, return ENOENT; } - //FIXME : check if the directory already exist, and ask the user if he wants - //to append to the traces. printf("Creating trace subdirectory %s\n", subtrace_name); ret = mkdir(subtrace_name, S_IRWXU|S_IRWXG|S_IRWXO); if(ret == -1) { @@ -255,7 +253,7 @@ int open_channel_trace_pairs(char *subchannel_name, char *subtrace_name, ret = stat(path_trace, &stat_buf); if(ret == 0) { if(append_mode) { - printf("Appending to file %s as resquested\n", path_trace); + printf("Appending to file %s as requested\n", path_trace); fd_pairs->pair[fd_pairs->num_pairs-1].trace = open(path_trace, O_WRONLY|O_APPEND, @@ -304,7 +302,7 @@ int read_subbuffer(struct fd_pair *pair) pair->mmap + (subbuf_index * pair->subbuf_size), pair->subbuf_size)); - if(ret != 0) { + if(ret < 0) { perror("Error in writing to file"); goto error; } -- 2.34.1