Changeset 2475 in MondoRescue for branches/2.2.10/mondo/src/common/libmondo-tools.c
- Timestamp:
- Nov 10, 2009, 2:52:43 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/2.2.10/mondo/src/common/libmondo-tools.c
r2462 r2475 313 313 314 314 /** 315 * Log a trace message to the trace file.316 * @bug This function seems orphaned. Please remove.317 */318 void log_trace(char *o)319 {320 /*@ pointers **************************************************** */321 FILE *fout;322 323 /*@ buffers ***************************************************** */324 char output[MAX_STR_LEN];325 326 /*@ int ****************************************************** */327 int i;328 329 /*@ end vars *************************************************** */330 331 if (o[0] == '\0') {332 return;333 }334 strcpy(output, o);335 i = (int) strlen(output);336 if (i <= 0) {337 return;338 }339 if (output[i - 1] < 32) {340 output[i - 1] = '\0';341 }342 if (g_text_mode) {343 printf("%s\n", output);344 }345 346 fout = fopen(MONDO_TRACEFILE, "a");347 if (fout) {348 fprintf(fout, "%s\n", output);349 paranoid_fclose(fout);350 } else {351 log_OS_error("Cannot write to tracefile");352 }353 }354 355 356 357 358 359 /**360 315 * Finish configuring the backup information structure. Call this function 361 316 * to set the parameters that depend on those that can be given on the command … … 711 666 } 712 667 713 unlink(MONDO_TRACEFILE);714 668 mr_asprintf(tmp,"rm -Rf %s/changed.files*",MONDO_CACHE); 715 669 run_program_and_log_output(tmp, FALSE);
Note:
See TracChangeset
for help on using the changeset viewer.