Changeset 2470 in MondoRescue
- Timestamp:
- Nov 10, 2009, 12:32:40 PM (15 years ago)
- Location:
- branches/2.2.9/mondo/src
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/2.2.9/mondo/src/common/libmondo-tools-EXT.h
r1917 r2470 18 18 extern void initialize_raidrec(struct raid_device_record *raidrec); 19 19 #endif 20 extern void log_trace(char *o);21 20 extern int some_basic_system_sanity_checks(); 22 21 -
branches/2.2.9/mondo/src/common/libmondo-tools.c
r2443 r2470 331 331 #endif 332 332 } 333 334 335 /**336 * Log a trace message to the trace file.337 * @bug This function seems orphaned. Please remove.338 */339 void log_trace(char *o)340 {341 /*@ pointers **************************************************** */342 FILE *fout;343 344 /*@ buffers ***************************************************** */345 char output[MAX_STR_LEN];346 347 /*@ int ****************************************************** */348 int i;349 350 /*@ end vars *************************************************** */351 352 if (o[0] == '\0') {353 return;354 }355 strcpy(output, o);356 i = (int) strlen(output);357 if (i <= 0) {358 return;359 }360 if (output[i - 1] < 32) {361 output[i - 1] = '\0';362 }363 if (g_text_mode364 /* && !strstr(last_line_of_file(MONDO_LOGFILE),output) */ ) {365 printf("%s\n", output);366 }367 368 fout = fopen(MONDO_TRACEFILE, "a");369 if (fout) {370 fprintf(fout, "%s\n", output);371 paranoid_fclose(fout);372 } else {373 log_OS_error("Cannot write to tracefile");374 }375 }376 377 378 379 333 380 334 … … 744 698 } 745 699 746 unlink(MONDO_TRACEFILE);747 700 mr_asprintf(&tmp,"rm -Rf %s/changed.files*",MONDO_CACHE); 748 701 run_program_and_log_output(tmp, FALSE); -
branches/2.2.9/mondo/src/common/libmondo-tools.h
r1917 r2470 21 21 void initialize_raidrec(struct raid_device_record *raidrec); 22 22 #endif 23 void log_trace(char *o);24 23 int some_basic_system_sanity_checks(); 25 24 -
branches/2.2.9/mondo/src/include/my-stuff.h
r2419 r2470 88 88 */ 89 89 #define MDSTAT_FILE "/proc/mdstat" 90 91 /**92 * @bug Apparently unused.93 */94 #define MONDO_TRACEFILE "/var/log/mondo-tracefile.log"95 90 96 91 #undef assert
Note:
See TracChangeset
for help on using the changeset viewer.