Changeset 2338 in MondoRescue for branches/2.2.10/mondo/src/common/libmondo-tools.c
- Timestamp:
- Aug 21, 2009, 1:47:12 AM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/2.2.10/mondo/src/common/libmondo-tools.c
r2334 r2338 469 469 mr_asprintf(bkpinfo->zip_exe, "gzip"); 470 470 mr_asprintf(bkpinfo->zip_suffix, "gz"); 471 } else if (bkpinfo->use_lzma) { 472 mr_asprintf(bkpinfo->zip_exe, "lzma"); 473 mr_asprintf(bkpinfo->zip_suffix, "lzma"); 471 474 } else if (bkpinfo->compression_level != 0) { 472 475 mr_asprintf(bkpinfo->zip_exe, "bzip2"); … … 723 726 if (bkpinfo->disaster_recovery) { 724 727 if (!does_nonMS_partition_exist()) { 725 fatal_error 726 ("I am in disaster recovery mode\nPlease don't run mondoarchive."); 728 fatal_error("I am in disaster recovery mode\nPlease don't run mondoarchive."); 727 729 } 728 730 } … … 733 735 paranoid_free(tmp); 734 736 if (find_and_store_mondoarchives_home(g_mondo_home)) { 735 fprintf(stderr, 736 "Cannot find Mondo's homedir. I think you have >1 'mondo' directory on your hard disk. Please delete the superfluous 'mondo' directories and try again\n"); 737 fprintf(stderr, "Cannot find Mondo's homedir. I think you have >1 'mondo' directory on your hard disk. Please delete the superfluous 'mondo' directories and try again\n"); 737 738 res++; 738 739 return (res); … … 783 784 void mr_free_bkpinfo() { 784 785 786 log_msg(1, "Freeing bkpinfo"); 785 787 mr_free(bkpinfo->media_device); 786 788 mr_free(bkpinfo->boot_device); … … 816 818 { 817 819 int i; 818 log_msg(1, "Hi"); 820 log_msg(1, "Initializing bkpinfo"); 821 bkpinfo = (struct s_bkpinfo *)mr_malloc(sizeof(struct s_bkpinfo)); 819 822 820 823 /* Initialized in same order as in the structure declaration to detect errors more easily */ … … 831 834 bkpinfo->use_lzo = FALSE; 832 835 bkpinfo->use_gzip = FALSE; 836 bkpinfo->use_lzma = FALSE; 833 837 bkpinfo->verify_data = FALSE; 834 838 bkpinfo->backup_data = FALSE; … … 937 941 if (system("which mkfs.vfat 2> /dev/null 1> /dev/null") 938 942 && !system("which mkfs.msdos 2> /dev/null 1> /dev/null")) { 939 log_it 940 ("OK, you've got mkfs.msdos but not mkfs.vfat; time for the fairy to wave her magic wand..."); 941 run_program_and_log_output 942 ("ln -sf `which mkfs.msdos` /sbin/mkfs.vfat", FALSE); 943 log_it("OK, you've got mkfs.msdos but not mkfs.vfat; time for the fairy to wave her magic wand..."); 944 run_program_and_log_output("ln -sf `which mkfs.msdos` /sbin/mkfs.vfat", FALSE); 943 945 } 944 946 mr_asprintf(tmp, "%s", call_program_and_get_last_line_of_output("free | grep Mem | head -n1 | tr -s ' ' '\t' | cut -f2")); … … 1346 1348 * information to the logfile. 1347 1349 */ 1348 void standard_log_debug_msg(int debug_level, const char *szFile, 1349 const char *szFunction, int nLine, 1350 const char *fmt, ...) 1351 { 1350 void standard_log_debug_msg(int debug_level, const char *szFile, const char *szFunction, int nLine, const char *fmt, ...) { 1351 1352 1352 va_list args; 1353 int i;1354 1353 static int depth = 0; 1355 1354 FILE *fout; … … 1368 1367 // add tabs to distinguish log levels 1369 1368 if (debug_level > 0) { 1370 for (i = 1; i < debug_level; i++) 1371 fprintf(fout, "\t"); 1369 fprintf(fout, "DBG%d: ", debug_level); 1372 1370 if (getpid() == g_main_pid) 1373 1371 fprintf(fout, "[Main] %s->%s#%d: ", szFile, szFunction, nLine); … … 1376 1374 else 1377 1375 fprintf(fout, "[TH=%d] %s->%s#%d: ", getpid(), szFile, szFunction, nLine); 1376 } else { 1377 fprintf(fout, "INFO: "); 1378 1378 } 1379 1379 va_start(args, fmt);
Note:
See TracChangeset
for help on using the changeset viewer.