Ignore:
Timestamp:
Feb 12, 2007, 11:13:09 AM (17 years ago)
Author:
Bruno Cornec
Message:

Fix a flaw in libmondo-mountlist.c (there since rev [1] !!) dur to the change of log_it macro.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/stable/mondo/src/common/libmondo-archive.c

    r1146 r1147  
    24052405    assert(bkpinfo != NULL);
    24062406    /* slice big files */
    2407     malloc_string(blah);
    24082407    malloc_string(biggielist);
    24092408    malloc_string(xattr_fname);
    24102409    malloc_string(acl_fname);
    2411     command = mr_malloc(1200);
    24122410    mvaddstr_and_log_it(g_currentY, 0,
    24132411                        "Archiving large files to media           ");
     
    24202418    }
    24212419
    2422     sprintf(command, "cp %s/biggielist.txt %s", bkpinfo->tmpdir,
     2420    mr_asprintf(&command, "cp %s/biggielist.txt %s", bkpinfo->tmpdir,
    24232421            biggielist);
    24242422    paranoid_system(command);
    2425     sprintf(blah, "biggielist = %s", biggielist);
     2423    mr_free(command);
     2424
     2425    mr_asprintf(&blah, "biggielist = %s", biggielist);
    24262426    mr_msg(2, blah);
     2427    mr_free(blah);
    24272428
    24282429    if (!does_file_exist(biggielist)) {
     
    24322433    if (g_getfattr) {
    24332434        get_fattr_list(biggielist, xattr_fname);
    2434         sprintf(command, "cp %s %s/archives/", xattr_fname,
     2435        mr_asprintf(&command, "cp %s %s/archives/", xattr_fname,
    24352436            bkpinfo->scratchdir);
    24362437        paranoid_system(command);
     2438        mr_free(command);
    24372439    }
    24382440    if (g_getfacl) {
    24392441        get_acl_list(biggielist, acl_fname);
    2440         sprintf(command, "cp %s %s/archives/", acl_fname, bkpinfo->scratchdir);
     2442        mr_asprintf(&command, "cp %s %s/archives/", acl_fname,
     2443             bkpinfo->scratchdir);
    24412444        paranoid_system(command);
     2445        mr_free(command);
    24422446    }
    24432447
    24442448    if (IS_THIS_A_STREAMING_BACKUP(bkpinfo->backup_media_type)) {
    24452449        res += write_EXAT_files_to_tape(bkpinfo, xattr_fname, acl_fname);
    2446         sprintf(blah, "%ld", count_lines_in_file(biggielist));
     2450        mr_asprintf(&blah, "%ld", count_lines_in_file(biggielist));
    24472451        write_header_block_to_stream((off_t)0, blah, BLK_START_BIGGIEFILES);
     2452        mr_free(blah);
    24482453    }
    24492454    res = make_slices_and_images(bkpinfo, biggielist);
     
    24592464        mvaddstr_and_log_it(g_currentY++, 74, "Done.");
    24602465    }
    2461     mr_free(blah);
    24622466    mr_free(biggielist);
    2463     mr_free(command);
    24642467    mr_free(xattr_fname);
    24652468    mr_free(acl_fname);
    24662469    return (retval);
    24672470}
    2468 
    24692471
    24702472
Note: See TracChangeset for help on using the changeset viewer.