From: compudj Date: Mon, 13 Jun 2005 17:54:42 +0000 (+0000) Subject: lttd daemon complete X-Git-Tag: v0.12.20~2541 X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=251b5c5ef2ed82f3981ffea208bca5281d9120fa;p=lttv.git lttd daemon complete git-svn-id: http://ltt.polymtl.ca/svn@948 04897980-b3bd-0310-b5e0-8ef037075253 --- diff --git a/ltt/branches/poly/lttd/lttd.c b/ltt/branches/poly/lttd/lttd.c index e090729c..ebd8a2d9 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; }