Changeset 1236 in MondoRescue for branches/2.2.2/mondo/src/common/libmondo-archive.c
- Timestamp:
- Mar 12, 2007, 12:23:16 AM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/2.2.2/mondo/src/common/libmondo-archive.c
r998 r1236 2588 2588 assert(bkpinfo != NULL); 2589 2589 /* slice big files */ 2590 malloc_string(blah);2591 2590 malloc_string(biggielist); 2592 2591 malloc_string(xattr_fname); 2593 2592 malloc_string(acl_fname); 2594 command = malloc(1200);2595 2593 mvaddstr_and_log_it(g_currentY, 0, 2596 2594 "Archiving large files to media "); … … 2603 2601 } 2604 2602 2605 sprintf(command, "cp %s/biggielist.txt %s", bkpinfo->tmpdir,2603 asprintf(&command, "cp %s/biggielist.txt %s", bkpinfo->tmpdir, 2606 2604 biggielist); 2607 2605 paranoid_system(command); 2608 sprintf(blah, "biggielist = %s", biggielist); 2606 paranoid_free(command); 2607 2608 asprintf(&blah, "biggielist = %s", biggielist); 2609 2609 log_msg(2, blah); 2610 paranoid_free(blah); 2610 2611 2611 2612 if (!does_file_exist(biggielist)) { … … 2615 2616 if (g_getfattr) { 2616 2617 get_fattr_list(biggielist, xattr_fname); 2617 sprintf(command, "cp %s %s/archives/", xattr_fname,2618 asprintf(&command, "cp %s %s/archives/", xattr_fname, 2618 2619 bkpinfo->scratchdir); 2619 2620 paranoid_system(command); 2621 paranoid_free(command); 2620 2622 } 2621 2623 if (g_getfacl) { 2622 2624 get_acl_list(biggielist, acl_fname); 2623 sprintf(command, "cp %s %s/archives/", acl_fname, bkpinfo->scratchdir); 2625 asprintf(&command, "cp %s %s/archives/", acl_fname, 2626 bkpinfo->scratchdir); 2624 2627 paranoid_system(command); 2628 paranoid_free(command); 2625 2629 } 2626 2630 2627 2631 if (IS_THIS_A_STREAMING_BACKUP(bkpinfo->backup_media_type)) { 2628 2632 res += write_EXAT_files_to_tape(bkpinfo, xattr_fname, acl_fname); 2629 sprintf(blah, "%ld", count_lines_in_file(biggielist));2633 asprintf(&blah, "%ld", count_lines_in_file(biggielist)); 2630 2634 write_header_block_to_stream((off_t)0, blah, BLK_START_BIGGIEFILES); 2635 paranoid_free(blah); 2631 2636 } 2632 2637 res = make_slices_and_images(bkpinfo, biggielist); … … 2649 2654 return (retval); 2650 2655 } 2651 2652 2656 2653 2657 … … 3474 3478 strcpy(tmp, slice_fname(biggie_file_number, 0, bkpinfo->tmpdir, "")); 3475 3479 fout = fopen(tmp, "w"); 3480 if (fout == NULL) { 3481 mr_msg(1, "Unable to open and write to %s\n", tmp); 3482 paranoid_free(tmp); 3483 paranoid_free(suffix); 3484 return (1); 3485 } 3486 3476 3487 (void) fwrite((void *) &biggiestruct, 1, sizeof(biggiestruct), fout); 3477 3488 paranoid_fclose(fout);
Note:
See TracChangeset
for help on using the changeset viewer.