X-Git-Url: http://git.lttng.org/?a=blobdiff_plain;f=lttv%2Fmodules%2Ftext%2Fsync_chain_batch.c;h=c88b13c5962623fdf3491829d9e1c0bf4f91ae8a;hb=1d597550379cb00832f73bd5402918fd6ed2e9df;hp=55ec91056f6397c1b8e1e997204e072136165946;hpb=d5b038ec901e9753a8569f33516a49361c54254c;p=lttv.git diff --git a/lttv/modules/text/sync_chain_batch.c b/lttv/modules/text/sync_chain_batch.c index 55ec9105..c88b13c5 100644 --- a/lttv/modules/text/sync_chain_batch.c +++ b/lttv/modules/text/sync_chain_batch.c @@ -295,35 +295,10 @@ void setupSyncChain(LttvTracesetContext* const traceSetContext) if (optionEvalGraphs) { - char* cwd; - int graphsFp; - // Create the graph directory right away in case the module initialization // functions have something to write in it. syncState->graphsDir= optionEvalGraphsDir; - cwd= changeToGraphDir(optionEvalGraphsDir); - - if ((graphsFp= open("graphs.gnu", O_WRONLY | O_CREAT | O_TRUNC, S_IRUSR | - S_IWUSR | S_IXUSR | S_IRGRP | S_IWGRP | S_IXGRP | S_IROTH - | S_IWOTH | S_IXOTH)) == -1) - { - g_error(strerror(errno)); - } - if ((syncState->graphsStream= fdopen(graphsFp, "w")) == NULL) - { - g_error(strerror(errno)); - } - - fprintf(syncState->graphsStream, - "#!/usr/bin/gnuplot\n\n" - "set terminal postscript eps color size 8in,6in\n"); - - retval= chdir(cwd); - if (retval == -1) - { - g_error(strerror(errno)); - } - free(cwd); + syncState->graphsStream= createGraphsDir(syncState->graphsDir); } else {