Ignore:
Timestamp:
Jun 17, 2009, 10:53:23 PM (11 years ago)
Author:
Bruno Cornec
Message:
  • Simplify log_it calls when possible (with just a fixed string)
  • issue with truncate_to_drive_name reported by valgrind at restore time. Needs rewrite IMO
File:
1 edited

Legend:

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

    r2229 r2230  
    262262    int retval = 0;
    263263
    264     log_it("%s","inside catchall");
     264    log_it("inside catchall");
    265265    assert(bkpinfo != NULL);
    266266    assert(mountlist != NULL);
    267267    assert(raidlist != NULL);
    268268    malloc_string(tmp);
    269     log_it("%s","pre wrm");
     269    log_it("pre wrm");
    270270    c = which_restore_mode();
    271     log_it("%s","post wrm");
     271    log_it("post wrm");
    272272    if (c == 'I' || c == 'C') {
    273273        interactively_obtain_media_parameters_from_user(FALSE);
     
    286286    }
    287287
    288     log_it("%s","post int");
     288    log_it("post int");
    289289
    290290    if (bkpinfo->backup_media_type == iso) {
     
    465465    }
    466466
    467     log_it("%s","About to load config file");
     467    log_it("About to load config file");
    468468    get_cfg_file_from_archive_or_bust();
    469469    read_cfg_file_into_bkpinfo(g_mondo_cfg_file);
    470     log_it("%s","Done loading config file; resizing ML");
     470    log_it("Done loading config file; resizing ML");
    471471    if (bkpinfo->backup_media_type == nfs) {
    472472        strcpy(tmp, bkpinfo->prefix);
     
    493493    }
    494494    for (done = FALSE; !done;) {
    495         log_it("%s","About to edit mountlist");
     495        log_it("About to edit mountlist");
    496496        if (g_text_mode) {
    497497            save_mountlist_to_disk(mountlist, g_mountlist_fname);
     
    502502            res = edit_mountlist(g_mountlist_fname, mountlist, raidlist);
    503503        }
    504         log_it("%s","Finished editing mountlist");
     504        log_it("Finished editing mountlist");
    505505        if (res) {
    506506            paranoid_MR_finish(1);
     
    681681    }
    682682
    683     log_it("%s","About to leave interactive_mode()");
     683    log_it("About to leave interactive_mode()");
    684684    if (retval) {
    685685        mvaddstr_and_log_it(g_currentY++,
     
    691691    paranoid_free(fstab_fname);
    692692    paranoid_free(old_restpath);
    693     log_it("%s","Leaving interactive_mode()");
     693    log_it("Leaving interactive_mode()");
    694694    return (retval);
    695695}
     
    885885        return (retval);
    886886    }
    887     log_it("%s","Restoring everything");
     887    log_it("Restoring everything");
    888888    retval += restore_everything(NULL);
    889889    clean_multipathconf();
     
    10061006                                 "Restore files to where? )",
    10071007                                 bkpinfo->restore_path, MAX_STR_LEN / 4)) {
    1008             log_it("%s","Restoring everything");
     1008            log_it("Restoring everything");
    10091009            retval += restore_everything(filelist);
    10101010            free_filelist(filelist);
     
    20352035
    20362036        if (g_getfattr) {
    2037             log_it("%s","Restoring xattr stuff");
     2037            log_it("Restoring xattr stuff");
    20382038            res = set_fattr_list(filelist_subset_fname, xattr_fname);
    20392039            if (res) {
     
    20462046
    20472047        if (g_getfacl) {
    2048             log_it("%s","Restoring acl stuff");
     2048            log_it("Restoring acl stuff");
    20492049            res = set_acl_list(filelist_subset_fname, acl_fname);
    20502050            if (res) {
     
    25052505        fclose(fbw);
    25062506        if (length_of_file(biggies_whose_EXATs_we_should_set) > 2) {
    2507             log_it("%s","Setting biggie-EXATs");
     2507            log_it("Setting biggie-EXATs");
    25082508            if (g_getfattr) {
    25092509                if (length_of_file(xattr_fname) > 0) {
     
    25222522            }
    25232523        } else {
    2524             log_it("%s","No biggiefiles selected. So, no biggie-EXATs to set.");
     2524            log_it("No biggiefiles selected. So, no biggie-EXATs to set.");
    25252525        }
    25262526    }
     
    26302630        }
    26312631        if (ctrl_chr == BLK_START_EXTENDED_ATTRIBUTES) {
    2632             log_it("%s","Reading EXAT files from tape");
     2632            log_it("Reading EXAT files from tape");
    26332633            res =
    26342634                read_EXAT_files_from_tape(&tmp_size, tmp_fname,
     
    29442944    }
    29452945
    2946     log_it("%s","what time is it");
     2946    log_it("what time is it");
    29472947
    29482948    /* Process command-line parameters */
     
    31273127        log_msg(2, "FYI, MOUNTLIST_FNAME = %s ", g_mountlist_fname);
    31283128
    3129         log_it("%s","About to call load_mountlist and load_raidtab");
     3129        log_it("About to call load_mountlist and load_raidtab");
    31303130        strcpy(bkpinfo->restore_path, MNT_RESTORING);
    31313131        read_cfg_file_into_bkpinfo(g_mondo_cfg_file);
    31323132        retval = load_mountlist(mountlist, g_mountlist_fname);
    31333133        retval += load_raidtab_into_raidlist(raidlist, RAIDTAB_FNAME);
    3134         log_it("%s","Returned from calling load_mountlist and load_raidtab successfully");
     3134        log_it("Returned from calling load_mountlist and load_raidtab successfully");
    31353135
    31363136        // BCO:To be reviewed
     
    31563156
    31573157        if (bkpinfo->restore_mode == nuke) {
    3158             log_it("%s","nuking");
     3158            log_it("nuking");
    31593159            retval += nuke_mode(mountlist, raidlist);
    31603160        } else if (bkpinfo->restore_mode == interactive) {
    3161             log_it("%s","catchall");
     3161            log_it("catchall");
    31623162            retval += catchall_mode(mountlist, raidlist);
    31633163        } else if (bkpinfo->restore_mode == compare) {
    3164             log_it("%s","compare");
     3164            log_it("compare");
    31653165            retval += compare_mode(mountlist, raidlist);
    31663166        } else if (bkpinfo->restore_mode == isoonly) {
    3167             log_it("%s","iso");
     3167            log_it("iso");
    31683168            retval = iso_mode(mountlist, raidlist, FALSE);
    31693169        } else if (bkpinfo->restore_mode == mbr) {
    3170             log_it("%s","mbr");
     3170            log_it("mbr");
    31713171            retval = mount_all_devices(mountlist, TRUE);
    31723172            if (!retval) {
     
    31783178            }
    31793179        } else if (bkpinfo->restore_mode == isonuke) {
    3180             log_it("%s","isonuke");
     3180            log_it("isonuke");
    31813181            retval = iso_mode(mountlist, raidlist, TRUE);
    31823182        } else {
    3183             log_it("%s","catchall (no mode specified in command-line call");
     3183            log_it("catchall (no mode specified in command-line call");
    31843184            retval += catchall_mode(mountlist, raidlist);
    31853185        }
Note: See TracChangeset for help on using the changeset viewer.