Changeset 3469 in MondoRescue


Ignore:
Timestamp:
Sep 11, 2015, 5:34:21 PM (9 years ago)
Author:
Bruno Cornec
Message:

Remove usage of a local use_star variable and use the one in bkpinfo instead

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/3.2/mondo/src/mondorestore/mondorestore.c

    r3430 r3469  
    673673    char *temp_log = NULL;
    674674    long matches = 0;
    675     bool use_star;
    676675    char *xattr_fname = NULL;
    677676    char *acl_fname = NULL;
     
    681680
    682681    log_msg(5, "Entering");
    683     use_star = (strstr(tarball_fname, ".star")) ? TRUE : FALSE;
     682    if (strstr(tarball_fname, ".star")) {
     683        bkpinfo->use_star = TRUE;
     684    } else {
     685        bkpinfo->use_star = FALSE;
     686    }
    684687    mr_asprintf(command, "mkdir -p %s/tmp", MNT_RESTORING);
    685688    run_program_and_log_output(command, 9);
     
    710713             save_filelist_entries_in_common(filelist_name, filelist,
    711714                                             filelist_subset_fname,
    712                                              use_star)) <= 0) {
     715                                             bkpinfo->use_star)) <= 0) {
    713716            log_msg(1, "Skipping fileset %ld", current_tarball_number);
    714717        } else {
     
    758761#endif
    759762
    760         if (use_star) {
     763        if (bkpinfo->use_star) {
    761764            mr_asprintf(command, "star -x -force-remove -sparse -U " STAR_ACL_SZ " file=%s", tarball_fname);
    762765            if (strstr(tarball_fname, ".bz2")) {
     
    797800        }
    798801
    799         if (! use_star) {
     802        if (! bkpinfo->use_star) {
    800803            if (g_getfattr) {
    801804                log_msg(1, "Setting fattr list %s", xattr_fname);
     
    826829        }
    827830        // Be verbose for star
    828         if (retval || use_star) {
     831        if (retval || bkpinfo->use_star) {
    829832            mr_asprintf(command, "cat %s >> %s", temp_log, MONDO_LOGFILE);
    830833            paranoid_system(command);
     
    14471450    long matches = 0;
    14481451    bool restore_this_fileset = FALSE;
    1449     bool use_star;
    14501452
    14511453    assert(bkpinfo != NULL);
     
    14531455
    14541456    /* to do it with a file... */
    1455     use_star = (strstr(tarball_fname, ".star")) ? TRUE : FALSE;
    14561457    mds = media_descriptor_string(bkpinfo->backup_media_type);
    14571458    log_msg(2, "Restoring from fileset #%ld (%ld KB) on %s #%d",
     
    14731474    if (strstr(tarball_fname, ".star")) {
    14741475        bkpinfo->use_star = TRUE;
     1476    } else {
     1477        bkpinfo->use_star = FALSE;
    14751478    }
    14761479    if (res) {
     
    14921495    } else                      // If restoring selectively then get TOC from tarball
    14931496    {
    1494         if (strstr(tarball_fname, ".star.")) {
    1495             use_star = TRUE;
     1497        if (bkpinfo->use_star) {
    14961498            mr_asprintf(command, "star -sparse -t file=%s %s", afio_fname, executable);
    14971499        } else {
    1498             use_star = FALSE;
    14991500            mr_asprintf(command, "afio -t -M 8m -b %ld %s %s", TAPE_BLOCK_SIZE, executable, afio_fname);
    15001501        }
     
    15091510             save_filelist_entries_in_common(filelist_fname, filelist,
    15101511                                             filelist_subset_fname,
    1511                                              use_star))
     1512                                             bkpinfo->use_star))
    15121513            <= 0 || length_of_file(filelist_subset_fname) < 2) {
    15131514            if (length_of_file(filelist_subset_fname) < 2) {
Note: See TracChangeset for help on using the changeset viewer.