Changeset 2296 in MondoRescue for branches/2.2.10/mondo/src/common/libmondo-archive.c
- Timestamp:
- Jul 23, 2009, 2:53:30 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/2.2.10/mondo/src/common/libmondo-archive.c
r2291 r2296 350 350 paranoid_free(command); 351 351 352 mr_asprintf(&command, "afio -o -b %ld -M 16m %s %s < %s 2>> %s", 353 TAPE_BLOCK_SIZE, zipparams, fname, filelist, MONDO_LOGFILE); 352 mr_asprintf(&command, "afio -o -b %ld -M 16m %s %s < %s 2>> %s", TAPE_BLOCK_SIZE, zipparams, fname, filelist, MONDO_LOGFILE); 354 353 paranoid_free(zipparams); 355 354 … … 867 866 log_msg(1, "lines_in_filelist = %ld", lines_in_filelist); 868 867 869 mr_asprintf(&command, 870 /* "mindi --custom 2=%s 3=%s/images 4=\"%s\" 5=\"%s\" \ 868 /* "mindi 1=%s --custom 2=%s 3=%s/images 4=\"%s\" 5=\"%s\" \ 871 869 6=\"%s\" 7=%ld 8=\"%s\" 9=\"%s\" 10=\"%s\" \ 872 870 11=\"%s\" 12=%s 13=%ld 14=\"%s\" 15=\"%s\" 16=\"%s\" 17=\"%s\" 18=%ld 19=%d",*/ 873 871 mr_asprintf(&command, "mindi %s --custom %s %s/images '%s' '%s' \ 874 872 '%s' %ld '%s' '%s' '%s' \ 875 873 '%s' %s %ld '%s' '%s' '%s' '%s' %ld %d '%s'", tmp2, bkpinfo->tmpdir, // parameter #2 … … 1076 1074 this_thread_no, archiving_set_no); 1077 1075 if (g_getfattr) { 1078 mr_asprintf(&curr_xattr_list_fname, XATTR_LIST_FNAME_RAW_SZ, 1079 bkpinfo->tmpdir, archiving_set_no); 1076 mr_asprintf(&curr_xattr_list_fname, XATTR_LIST_FNAME_RAW_SZ, bkpinfo->tmpdir, archiving_set_no); 1080 1077 get_fattr_list(archiving_filelist_fname, curr_xattr_list_fname); 1081 1078 mr_free(curr_xattr_list_fname); 1082 1079 } 1083 1080 if (g_getfacl) { 1084 mr_asprintf(&curr_acl_list_fname, ACL_LIST_FNAME_RAW_SZ, 1085 bkpinfo->tmpdir, archiving_set_no); 1081 mr_asprintf(&curr_acl_list_fname, ACL_LIST_FNAME_RAW_SZ, bkpinfo->tmpdir, archiving_set_no); 1086 1082 get_acl_list(archiving_filelist_fname, curr_acl_list_fname); 1087 1083 mr_free(curr_acl_list_fname); … … 1097 1093 1098 1094 if (res) { 1099 mr_asprintf(&tmp, 1100 "Errors occurred while archiving set %ld. Please review logs.", 1101 archiving_set_no); 1095 mr_asprintf(&tmp, "Errors occurred while archiving set %ld. Please review logs.", archiving_set_no); 1102 1096 log_to_screen(tmp); 1103 1097 mr_free(tmp); … … 1427 1421 } else { 1428 1422 // store set N 1429 mr_asprintf(&storing_filelist_fname, FILELIST_FNAME_RAW_SZ, 1430 bkpinfo->tmpdir, storing_set_no); 1431 mr_asprintf(&storing_afioball_fname, AFIOBALL_FNAME_RAW_SZ, 1432 bkpinfo->tmpdir, storing_set_no, bkpinfo->zip_suffix); 1423 mr_asprintf(&storing_filelist_fname, FILELIST_FNAME_RAW_SZ, bkpinfo->tmpdir, storing_set_no); 1424 mr_asprintf(&storing_afioball_fname, AFIOBALL_FNAME_RAW_SZ, bkpinfo->tmpdir, storing_set_no, bkpinfo->zip_suffix); 1433 1425 if (g_getfattr) { 1434 mr_asprintf(&curr_xattr_list_fname, XATTR_LIST_FNAME_RAW_SZ, 1435 bkpinfo->tmpdir, storing_set_no); 1426 mr_asprintf(&curr_xattr_list_fname, XATTR_LIST_FNAME_RAW_SZ, bkpinfo->tmpdir, storing_set_no); 1436 1427 } 1437 1428 if (g_getfacl) { 1438 mr_asprintf(&curr_acl_list_fname, ACL_LIST_FNAME_RAW_SZ, 1439 bkpinfo->tmpdir, storing_set_no); 1429 mr_asprintf(&curr_acl_list_fname, ACL_LIST_FNAME_RAW_SZ, bkpinfo->tmpdir, storing_set_no); 1440 1430 } 1441 1431 … … 1491 1481 mr_free(media_usage_comment); 1492 1482 if (res) { 1493 mr_asprintf(&tmp, "Failed to add archive %ld's files to CD dir\n", 1494 storing_set_no); 1483 mr_asprintf(&tmp, "Failed to add archive %ld's files to CD dir\n", storing_set_no); 1495 1484 log_to_screen(tmp); 1496 1485 paranoid_free(tmp); … … 1717 1706 1718 1707 if (bkpinfo->call_before_iso[0] != '\0') { 1719 mr_asprintf(&message_to_screen, "Running pre-ISO call for CD#%d", 1720 g_current_media_number); 1708 mr_asprintf(&message_to_screen, "Running pre-ISO call for CD#%d", g_current_media_number); 1721 1709 res = 1722 1710 eval_call_to_make_ISO(bkpinfo->call_before_iso, … … 1763 1751 retval += res; 1764 1752 #ifdef DVDRWFORMAT 1765 mr_asprintf(&tmp, 1766 "tail -n8 %s | grep 'blank=full.*dvd-compat.*DAO'", 1767 MONDO_LOGFILE); 1753 mr_asprintf(&tmp, "tail -n8 %s | grep 'blank=full.*dvd-compat.*DAO'", MONDO_LOGFILE); 1768 1754 if (g_backup_media_type == dvd 1769 1755 && (res || !run_program_and_log_output(tmp, 1))) { … … 2089 2075 "Calling ntfsclone in background because %s is an NTFS partition", 2090 2076 bigfile_fname); 2091 mr_asprintf(&sz_devfile, "%s/%d.%d.000", bkpinfo->tmpdir, 2092 (int) (random() % 32768), 2093 (int) (random() % 32768)); 2077 mr_asprintf(&sz_devfile, "%s/%d.%d.000", bkpinfo->tmpdir, (int) (random() % 32768), (int) (random() % 32768)); 2094 2078 mkfifo(sz_devfile, 0x770); 2095 2079 ntfsprog_fifo = sz_devfile; … … 2774 2758 mr_asprintf(&tmp, "cat %s 2> /dev/null", szserfname); 2775 2759 mr_free(our_serial_str); 2776 mr_asprintf(&our_serial_str, "%s", 2777 call_program_and_get_last_line_of_output(tmp)); 2760 mr_asprintf(&our_serial_str, "%s", call_program_and_get_last_line_of_output(tmp)); 2778 2761 mr_free(tmp); 2779 2762 // FIXME - should be able to use last_line_of_file(), surely? … … 2812 2795 eject_device(cdrom_dev); 2813 2796 mds = media_descriptor_string(g_backup_media_type); 2814 mr_asprintf(&tmp, "I am about to burn %s #%d of the backup set. Please insert %s and press Enter.", 2815 mds, g_current_media_number, mds); 2797 mr_asprintf(&tmp, "I am about to burn %s #%d of the backup set. Please insert %s and press Enter.", mds, g_current_media_number, mds); 2816 2798 mr_free(mds); 2817 2799 … … 3114 3096 mr_asprintf(&tmp, "Problem with slice # %ld", slice_num); 3115 3097 } else { 3116 mr_asprintf(&tmp, "%s - Bigfile #%ld, slice #%ld compressed OK ", biggie_filename, biggie_file_number + 1, 3117 slice_num); 3098 mr_asprintf(&tmp, "%s - Bigfile #%ld, slice #%ld compressed OK ", biggie_filename, biggie_file_number + 1, slice_num); 3118 3099 } 3119 3100 #ifndef _XWIN … … 3351 3332 if (space_occupied_by_cd(bkpinfo->scratchdir) / 1024 > 3352 3333 bkpinfo->media_size[g_current_media_number]) { 3353 mr_asprintf(&tmp1, 3354 "Warning! CD is too big. It occupies %ld KB, which is more than the %ld KB allowed.", 3355 (long) space_occupied_by_cd(bkpinfo->scratchdir), 3334 mr_asprintf(&tmp1, "Warning! CD is too big. It occupies %ld KB, which is more than the %ld KB allowed.", (long) space_occupied_by_cd(bkpinfo->scratchdir), 3356 3335 (long) bkpinfo->media_size[g_current_media_number]); 3357 3336 log_to_screen(tmp1); 3358 3337 mr_free(tmp1); 3359 3338 } 3360 mr_asprintf(&isofile, "%s/%s/%s-%d.iso", bkpinfo->isodir, 3361 bkpinfo->nfs_remote_dir, bkpinfo->prefix, 3362 g_current_media_number); 3339 mr_asprintf(&isofile, "%s/%s/%s-%d.iso", bkpinfo->isodir, bkpinfo->nfs_remote_dir, bkpinfo->prefix, g_current_media_number); 3363 3340 for (that_one_was_ok = FALSE; !that_one_was_ok;) { 3364 3341 if (bkpinfo->backup_media_type != usb) { … … 3421 3398 } 3422 3399 wipe_archives(bkpinfo->scratchdir); 3423 mr_asprintf(&tmp1, "rm -Rf %s/images/*gz %s/images/*data*img", 3424 bkpinfo->scratchdir, bkpinfo->scratchdir); 3400 mr_asprintf(&tmp1, "rm -Rf %s/images/*gz %s/images/*data*img", bkpinfo->scratchdir, bkpinfo->scratchdir); 3425 3401 if (system(tmp1)) { 3426 3402 log_msg
Note:
See TracChangeset
for help on using the changeset viewer.