Ignore:
Timestamp:
Sep 27, 2007, 12:21:18 PM (17 years ago)
Author:
Bruno Cornec
Message:
  • Fix bug #197 (based on an initial patch of Scott Cummings)
  • Fix a bug where df was using locale to print messages and wasn't filtered correctly
  • mkdtemp checked in configure
  • reset_bkpinfo called as early as possible by both main program.
  • It creates a tmpdir cleanly with mkdtemp in setup_tmpdir subfunction, which takes in account TMPIR and TMP env var. Remains to see what tmpfs does and tests
  • configure.in should also be filtered.
  • Remove g_bkpinfo_DONTUSETHIS
  • remove bkpinfo also from header files
  • Render bkpinfo global (potential issue on thread, but should not be a problem as that structure is indeed static during archive)
  • Apply patch from Andree Leidenfrost, modified a bit to use bkpinfo->tmpdir instead of /tmp or MINDI_CACHE when appropriate. Fix security issues in mondo. Thanks al ot Andree for catching all those issues.
  • /tmp => /var/log for mondorestore.log in mindi
  • Update linux terminfo to fix a color issue (Andree Leidenfrost)
  • Removes useless log file (Andree Leidenfrost)
  • replace vi with find_my_editor during restore (Andree Leidenfrost)
  • sync in bg in mindi (VMWare issue to look at)
  • mindi/mindi-busybox have a different version than mondo for pb
  • PB-SUF also added to spec file
  • Fix a bug for pb build (omission of PB-SUF declaration)

(merge -r1631:1662 $SVN_M/branches/2.2.5)

File:
1 edited

Legend:

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

    r1639 r1663  
    7979extern char *MONDO_LOGFILE;
    8080
     81/* Reference to global bkpinfo */
     82extern struct s_bkpinfo *bkpinfo;
     83
    8184
    8285
     
    198201
    199202int
    200 archive_this_fileset_with_star(struct s_bkpinfo *bkpinfo, char *filelist,
    201                                char *fname, int setno)
     203archive_this_fileset_with_star(char *filelist, char *fname, int setno)
    202204{
    203205    int retval = 0;
     
    297299 */
    298300int
    299 archive_this_fileset(struct s_bkpinfo *bkpinfo, char *filelist,
    300                      char *fname, int setno)
     301archive_this_fileset(char *filelist, char *fname, int setno)
    301302{
    302303
     
    319320
    320321    if (bkpinfo->compression_level > 0 && bkpinfo->use_star) {
    321         return (archive_this_fileset_with_star
    322                 (bkpinfo, filelist, fname, setno));
     322        return (archive_this_fileset_with_star(filelist, fname, setno));
    323323    }
    324324
     
    431431 * @ingroup archiveGroup
    432432 */
    433 int backup_data(struct s_bkpinfo *bkpinfo)
     433int backup_data()
    434434{
    435435    int retval = 0, res = 0;
     
    437437
    438438    assert(bkpinfo != NULL);
    439     set_g_cdrom_and_g_dvd_to_bkpinfo_value(bkpinfo);
     439    set_g_cdrom_and_g_dvd_to_bkpinfo_value();
    440440
    441441    if (bkpinfo->backup_media_type == dvd) {
     
    452452    }
    453453
    454     if ((res = prepare_filelist(bkpinfo))) {    /* generate scratchdir/filelist.full */
     454    if ((res = prepare_filelist())) {   /* generate scratchdir/filelist.full */
    455455        fatal_error("Failed to generate filelist catalog");
    456456    }
    457     if (call_filelist_chopper(bkpinfo)) {
     457    if (call_filelist_chopper()) {
    458458        fatal_error("Failed to run filelist chopper");
    459459    }
     
    472472    mr_free(tmp);
    473473
    474     copy_mondo_and_mindi_stuff_to_scratchdir(bkpinfo);  // payload, too, if it exists
     474    copy_mondo_and_mindi_stuff_to_scratchdir(); // payload, too, if it exists
    475475#if __FreeBSD__ == 5
    476476    strcpy(bkpinfo->kernel_path, "/boot/kernel/kernel");
     
    486486#error "I don't know about this system!"
    487487#endif
    488     if ((res = call_mindi_to_supply_boot_disks(bkpinfo))) {
     488    if ((res = call_mindi_to_supply_boot_disks())) {
    489489        fatal_error("Failed to generate boot+data disks");
    490490    }
    491     retval += do_that_initial_phase(bkpinfo);   // prepare
     491    retval += do_that_initial_phase();  // prepare
    492492    mr_asprintf(&tmp, "rm -f %s/images/*.iso", bkpinfo->scratchdir);
    493493    run_program_and_log_output(tmp, 1);
    494494    mr_free(tmp);
    495     retval += make_those_afios_phase(bkpinfo);  // backup regular files
    496     retval += make_those_slices_phase(bkpinfo); // backup BIG files
    497     retval += do_that_final_phase(bkpinfo); // clean up
     495    retval += make_those_afios_phase(); // backup regular files
     496    retval += make_those_slices_phase();    // backup BIG files
     497    retval += do_that_final_phase();    // clean up
    498498    mr_msg(1, "Creation of archives... complete.");
    499499    if (bkpinfo->verify_data) {
     
    529529 * @ingroup MLarchiveGroup
    530530 */
    531 int call_mindi_to_supply_boot_disks(struct s_bkpinfo *bkpinfo)
     531int call_mindi_to_supply_boot_disks()
    532532{
    533533    /*@ buffer ************************************************************ */
     
    10051005    char *curr_acl_list_fname;
    10061006
    1007     struct s_bkpinfo *bkpinfo;
     1007    struct s_bkpinfo *bkpinfo_bis;
    10081008    char *tmp = NULL;
    10091009    int res = 0, retval = 0;
     
    10201020    p_next_set_to_archive = (int *) (inbuf + 8);
    10211021    p_list_of_fileset_flags = (char *) (inbuf + 12);
    1022     bkpinfo = (struct s_bkpinfo *) (inbuf + BKPINFO_LOC_OFFSET);
     1022    bkpinfo_bis = (struct s_bkpinfo *) (inbuf + BKPINFO_LOC_OFFSET);
    10231023
    10241024    sprintf(archiving_filelist_fname, FILELIST_FNAME_RAW_SZ,
     
    10881088        mr_msg(4, "[%d:%d] - archiving %d...", getpid(),
    10891089                this_thread_no, archiving_set_no);
    1090         res = archive_this_fileset(bkpinfo, archiving_filelist_fname,
     1090        res =
     1091            archive_this_fileset(archiving_filelist_fname,
    10911092                                 archiving_afioball_fname,
    10921093                                 archiving_set_no);
     
    11411142 * @ingroup MLarchiveGroup
    11421143 */
    1143 int do_that_final_phase(struct s_bkpinfo *bkpinfo)
     1144int do_that_final_phase()
    11441145{
    11451146
     
    11571158    if (IS_THIS_A_STREAMING_BACKUP(bkpinfo->backup_media_type)) {
    11581159        /* write tape/cdstream */
    1159         closeout_tape(bkpinfo);
     1160        closeout_tape();
    11601161    } else {
    11611162        /* write final ISO/USB */
    1162         res = write_final_iso_if_necessary(bkpinfo);
     1163        res = write_final_iso_if_necessary();
    11631164        retval += res;
    11641165        if (res) {
     
    12001201 * @ingroup MLarchiveGroup
    12011202 */
    1202 int do_that_initial_phase(struct s_bkpinfo *bkpinfo)
     1203int do_that_initial_phase()
    12031204{
    12041205    /*@ int *************************************** */
     
    13091310 * @return The number of errors encountered (0 for success)
    13101311 */
    1311 int make_afioballs_and_images(struct s_bkpinfo *bkpinfo)
     1312int make_afioballs_and_images()
    13121313{
    13131314
     
    13671368                       _("Please wait. This may take a couple of hours."),
    13681369                       _("Working..."),
    1369                        get_last_filelist_number(bkpinfo) + 1);
     1370                       get_last_filelist_number() + 1);
    13701371
    13711372    srand((unsigned int) getpid());
     
    14331434                sleep(5);
    14341435            }
    1435             strcpy(media_usage_comment,
    1436                    percent_media_full_comment(bkpinfo));
     1436            strcpy(media_usage_comment, percent_media_full_comment());
    14371437            /* copy to CD (scratchdir) ... and an actual CD-R if necessary */
    14381438            if (IS_THIS_A_STREAMING_BACKUP(bkpinfo->backup_media_type)) {
     
    14421442                                                       storing_afioball_fname);
    14431443                iamhere("Writing EXAT files");
    1444                 res += write_EXAT_files_to_tape(bkpinfo,
    1445                                                 curr_xattr_list_fname,
     1444                res += write_EXAT_files_to_tape(curr_xattr_list_fname,
    14461445                                                curr_acl_list_fname);
    14471446                // archives themselves
    14481447                res +=
    1449                     move_files_to_stream(bkpinfo, storing_afioball_fname,
     1448                    move_files_to_stream(storing_afioball_fname,
    14501449                                         NULL);
    14511450            } else {
    14521451                if (g_getfacl) {
    14531452                    if (g_getfattr) {
    1454                         res = move_files_to_cd(bkpinfo, storing_filelist_fname,
     1453                        res = move_files_to_cd(storing_filelist_fname,
    14551454                                     curr_xattr_list_fname,
    14561455                                     curr_acl_list_fname,
    14571456                                     storing_afioball_fname, NULL);
    14581457                    } else {
    1459                         res = move_files_to_cd(bkpinfo, storing_filelist_fname,
     1458                        res = move_files_to_cd(storing_filelist_fname,
    14601459                                    curr_acl_list_fname,
    14611460                                    storing_afioball_fname, NULL);
     
    14631462                } else {
    14641463                    if (g_getfattr) {
    1465                             res = move_files_to_cd(bkpinfo, storing_filelist_fname,
     1464                            res = move_files_to_cd(storing_filelist_fname,
    14661465                                    curr_xattr_list_fname,
    14671466                                    storing_afioball_fname, NULL);
    14681467                    } else {
    1469                             res = move_files_to_cd(bkpinfo, storing_filelist_fname,
     1468                            res = move_files_to_cd(storing_filelist_fname,
    14701469                                    storing_afioball_fname, NULL);
    14711470                    }
     
    15451544 * @return The number of errors encountered (0 for success)
    15461545 */
    1547 int make_iso_fs(struct s_bkpinfo *bkpinfo, char *destfile)
     1546int make_iso_fs(char *destfile)
    15481547{
    15491548    /*@ int ********************************************** */
     
    15921591        mr_asprintf(&message_to_screen, "Running pre-ISO call for CD#%d",
    15931592                g_current_media_number);
    1594         res = eval_call_to_make_ISO(bkpinfo, bkpinfo->call_before_iso,
     1593        res = eval_call_to_make_ISO(bkpinfo->call_before_iso,
    15951594                                destfile, g_current_media_number,
    15961595                                MONDO_LOGFILE, message_to_screen);
     
    16181617                ("Serious error(s) occurred already. I shan't try to write to media.");
    16191618        } else {
    1620             res = eval_call_to_make_ISO(bkpinfo, bkpinfo->call_make_iso,
     1619            res = eval_call_to_make_ISO(bkpinfo->call_make_iso,
    16211620                                        destfile, g_current_media_number,
    16221621                                        MONDO_LOGFILE, message_to_screen);
     
    16801679                pause_for_N_seconds(5, "Letting DVD drive settle");
    16811680                res =
    1682                     eval_call_to_make_ISO(bkpinfo, bkpinfo->call_make_iso,
     1681                    eval_call_to_make_ISO(bkpinfo->call_make_iso,
    16831682                                          destfile,
    16841683                                          g_current_media_number,
     
    17241723                 bkpinfo->backup_media_string,
    17251724                 g_current_media_number);
    1726         res = eval_call_to_make_ISO(bkpinfo, bkpinfo->call_after_iso,
     1725        res = eval_call_to_make_ISO(bkpinfo->call_after_iso,
    17271726                                    destfile, g_current_media_number,
    17281727                                    MONDO_LOGFILE, message_to_screen);
     
    17831782 */
    17841783int
    1785 make_slices_and_images(struct s_bkpinfo *bkpinfo, char *biggielist_fname)
     1784make_slices_and_images(char *biggielist_fname)
    17861785{
    17871786
     
    18141813
    18151814    estimated_total_noof_slices =
    1816         size_of_all_biggiefiles_K(bkpinfo) / bkpinfo->optimal_set_size + 1;
     1815        size_of_all_biggiefiles_K() / bkpinfo->optimal_set_size + 1;
    18171816
    18181817    mr_msg(1, "size of all biggiefiles = %ld",
    1819             size_of_all_biggiefiles_K(bkpinfo));
     1818            size_of_all_biggiefiles_K());
    18201819    mr_msg(1, "estimated_total_noof_slices = %ld KB / %ld KB = %ld",
    1821             size_of_all_biggiefiles_K(bkpinfo), bkpinfo->optimal_set_size,
     1820            size_of_all_biggiefiles_K(), bkpinfo->optimal_set_size,
    18221821            estimated_total_noof_slices);
    18231822
     
    19091908            }
    19101909            res =
    1911                 slice_up_file_etc(bkpinfo, bigfile_fname,
     1910                slice_up_file_etc(bigfile_fname,
    19121911                                  ntfsprog_fifo, biggie_file_number,
    19131912                                  noof_biggie_files, use_ntfsprog);
     
    19571956 * @see make_afioballs_and_images
    19581957 */
    1959 int make_afioballs_and_images_OLD(struct s_bkpinfo *bkpinfo)
     1958int make_afioballs_and_images_OLD()
    19601959{
    19611960
     
    19831982                       _("Please wait. This may take a couple of hours."),
    19841983                       _("Working..."),
    1985                        get_last_filelist_number(bkpinfo) + 1);
     1984                       get_last_filelist_number() + 1);
    19861985
    19871986    mr_asprintf(&curr_filelist_fname, FILELIST_FNAME_RAW_SZ, bkpinfo->tmpdir,
     
    20072006
    20082007        mr_msg(1, "Archiving set %ld", curr_set_no);
    2009         res = archive_this_fileset(bkpinfo, curr_filelist_fname,
     2008        res = archive_this_fileset(curr_filelist_fname,
    20102009                                 curr_afioball_fname, curr_set_no);
    20112010        retval += res;
     
    20182017        }
    20192018
    2020         strcpy(media_usage_comment, percent_media_full_comment(bkpinfo));
     2019        strcpy(media_usage_comment, percent_media_full_comment());
    20212020
    20222021        /* copy to CD (scratchdir) ... and an actual CD-R if necessary */
     
    20272026                                                   curr_afioball_fname);
    20282027            iamhere("Writing EXAT files");
    2029             res += write_EXAT_files_to_tape(bkpinfo, curr_xattr_list_fname,
     2028            res += write_EXAT_files_to_tape(curr_xattr_list_fname,
    20302029                                            curr_acl_list_fname);
    20312030            // archives themselves
    2032             res = move_files_to_stream(bkpinfo, curr_afioball_fname, NULL);
     2031            res = move_files_to_stream(curr_afioball_fname, NULL);
    20332032        } else {
    20342033                if (g_getfacl) {
    20352034                    if (g_getfattr) {
    2036                         res = move_files_to_cd(bkpinfo, curr_filelist_fname,
     2035                        res = move_files_to_cd(curr_filelist_fname,
    20372036                                     curr_xattr_list_fname,
    20382037                                     curr_acl_list_fname,
    20392038                                     curr_afioball_fname, NULL);
    20402039                    } else {
    2041                         res = move_files_to_cd(bkpinfo, curr_filelist_fname,
     2040                        res = move_files_to_cd(curr_filelist_fname,
    20422041                                    curr_acl_list_fname,
    20432042                                    curr_afioball_fname, NULL);
     
    20452044                } else {
    20462045                    if (g_getfattr) {
    2047                             res = move_files_to_cd(bkpinfo, curr_filelist_fname,
     2046                            res = move_files_to_cd(curr_filelist_fname,
    20482047                                    curr_xattr_list_fname,
    20492048                                    curr_afioball_fname, NULL);
    20502049                    } else {
    2051                             res = move_files_to_cd(bkpinfo, curr_filelist_fname,
     2050                            res = move_files_to_cd(curr_filelist_fname,
    20522051                                    curr_afioball_fname, NULL);
    20532052                    }
     
    20972096 * @ingroup MLarchiveGroup
    20982097 */
    2099 int make_those_afios_phase(struct s_bkpinfo *bkpinfo)
     2098int make_those_afios_phase()
    21002099{
    21012100    /*@ int ******************************************* */
     
    21142113        mr_msg(1,
    21152114                "Using single-threaded make_afioballs_and_images() to suit b0rken FreeBSD 5.0");
    2116         res = make_afioballs_and_images_OLD(bkpinfo);
     2115        res = make_afioballs_and_images_OLD();
    21172116#else
    2118         res = make_afioballs_and_images_OLD(bkpinfo);
     2117        res = make_afioballs_and_images_OLD();
    21192118#endif
    21202119        write_header_block_to_stream((off_t)0, "stop-afioballs",
    21212120                                     BLK_STOP_AFIOBALLS);
    21222121    } else {
    2123         res = make_afioballs_and_images(bkpinfo);
     2122        res = make_afioballs_and_images();
    21242123    }
    21252124
     
    21432142 * @ingroup MLarchiveGroup
    21442143 */
    2145 int make_those_slices_phase(struct s_bkpinfo *bkpinfo)
     2144int make_those_slices_phase()
    21462145{
    21472146
     
    21952194
    21962195    if (IS_THIS_A_STREAMING_BACKUP(bkpinfo->backup_media_type)) {
    2197         res += write_EXAT_files_to_tape(bkpinfo, xattr_fname, acl_fname);
     2196        res += write_EXAT_files_to_tape(xattr_fname, acl_fname);
    21982197        mr_asprintf(&blah, "%ld", count_lines_in_file(biggielist));
    21992198        write_header_block_to_stream((off_t)0, blah, BLK_START_BIGGIEFILES);
     
    22072206    }
    22082207
    2209     res = make_slices_and_images(bkpinfo, biggielist);
     2208    res = make_slices_and_images(biggielist);
    22102209    mr_free(biggielist);
    22112210
     
    22342233 * transfer files over the network) or leave it as is.
    22352234 */
    2236 int (*move_files_to_cd) (struct s_bkpinfo *, char *, ...) =
     2235int (*move_files_to_cd) (char *, ...) =
    22372236    _move_files_to_cd;
    22382237
     
    22552254 * @return The number of errors encountered (0 for success)
    22562255 */
    2257 int _move_files_to_cd(struct s_bkpinfo *bkpinfo, char *files_to_add, ...)
     2256int _move_files_to_cd(char *files_to_add, ...)
    22582257{
    22592258
     
    22962295    if (would_occupy / 1024 > bkpinfo->media_size) {
    22972296        /* FALSE because this is not the last CD we'll write */
    2298         res = write_iso_and_go_on(bkpinfo, FALSE);
     2297        res = write_iso_and_go_on(FALSE);
    22992298        retval += res;
    23002299        if (res) {
     
    23442343 * transfer files over the network) or leave it as is.
    23452344 */
    2346 int (*move_files_to_stream) (struct s_bkpinfo *, char *, ...) =
     2345int (*move_files_to_stream) (char *, ...) =
    23472346    _move_files_to_stream;
    23482347
     
    23612360 */
    23622361int
    2363 _move_files_to_stream(struct s_bkpinfo *bkpinfo, char *files_to_add, ...)
     2362_move_files_to_stream(char *files_to_add, ...)
    23642363{
    23652364
     
    24052404            type = other;
    24062405        }
    2407         res = write_file_to_stream_from_file(bkpinfo, curr_file);
     2406        res = write_file_to_stream_from_file(curr_file);
    24082407        retval += res;
    24092408        unlink(curr_file);
     
    25172516    }
    25182517    log_to_screen("Scanning CD-ROM drive...");
    2519     sprintf(mtpt, "/tmp/cd.mtpt.%ld.%ld", (long int) random(),
    2520             (long int) random());
     2518    sprintf(mtpt, "%s/cd.mtpt", bkpinfo->tmpdir);
    25212519    make_hole_for_dir(mtpt);
    25222520
     
    26702668 */
    26712669int
    2672 slice_up_file_etc(struct s_bkpinfo *bkpinfo, char *biggie_filename,
     2670slice_up_file_etc(char *biggie_filename,
    26732671                  char *ntfsprog_fifo, long biggie_file_number,
    26742672                  long noof_biggie_files, bool use_ntfsprog)
     
    27972795    if (IS_THIS_A_STREAMING_BACKUP(bkpinfo->backup_media_type)) {
    27982796        res =
    2799             move_files_to_stream(bkpinfo,
    2800                                  slice_fname(biggie_file_number, 0,
     2797            move_files_to_stream(slice_fname(biggie_file_number, 0,
    28012798                                             bkpinfo->tmpdir, ""), NULL);
    28022799    } else {
    28032800        res =
    2804             move_files_to_cd(bkpinfo,
    2805                              slice_fname(biggie_file_number, 0,
     2801            move_files_to_cd(slice_fname(biggie_file_number, 0,
    28062802                                         bkpinfo->tmpdir, ""), NULL);
    28072803    }
     
    28232819                           suffix));
    28242820
    2825         mr_asprintf(&tmp, percent_media_full_comment(bkpinfo));
     2821        mr_asprintf(&tmp, percent_media_full_comment());
    28262822        update_progress_form(tmp);
    28272823        mr_free(tmp);
     
    29172913            maintain_collection_of_recent_archives(bkpinfo->tmpdir,
    29182914                                                   file_to_archive);
    2919             res = move_files_to_stream(bkpinfo, file_to_archive, NULL);
     2915            res = move_files_to_stream(file_to_archive, NULL);
    29202916        } else {
    2921             res = move_files_to_cd(bkpinfo, file_to_archive, NULL);
     2917            res = move_files_to_cd(file_to_archive, NULL);
    29222918        }
    29232919        mr_free(file_to_archive);
     
    30143010 * however, this occurs rarely.
    30153011 */
    3016 int write_final_iso_if_necessary(struct s_bkpinfo *bkpinfo)
     3012int write_final_iso_if_necessary()
    30173013{
    30183014    /*@ int ***************************************************** */
     
    30373033#endif
    30383034    mr_free(tmp);
    3039     res = write_iso_and_go_on(bkpinfo, TRUE);
     3035    res = write_iso_and_go_on(TRUE);
    30403036#ifndef _XWIN
    30413037    if (!g_text_mode) {
     
    30653061 * @see make_iso_fs
    30663062 */
    3067 int write_iso_and_go_on(struct s_bkpinfo *bkpinfo, bool last_cd)
     3063int write_iso_and_go_on(bool last_cd)
    30683064{
    30693065    /*@ pointers **************************************************** */
     
    31473143    for (that_one_was_ok = FALSE; !that_one_was_ok;) {
    31483144        if (bkpinfo->backup_media_type != usb) {
    3149             res = make_iso_fs(bkpinfo, isofile);
     3145            res = make_iso_fs(isofile);
    31503146        } else {
    31513147        }
     
    31683164            chdir("/");
    31693165            iamhere("Before calling verify_cd_image()");
    3170             res += verify_cd_image(bkpinfo);
     3166            res += verify_cd_image();
    31713167            iamhere("After calling verify_cd_image()");
    31723168        }
     
    32273223 * @ingroup verifyGroup
    32283224 */
    3229 int verify_data(struct s_bkpinfo *bkpinfo)
     3225int verify_data()
    32303226{
    32313227    int res = 0, retval = 0, cdno = 0;
     
    32383234        mvaddstr_and_log_it(g_currentY, 0,
    32393235                            "Verifying archives against live filesystem");
    3240         verify_tape_backups(bkpinfo);
     3236        verify_tape_backups();
    32413237        mvaddstr_and_log_it(g_currentY++, 74, "Done.");
    32423238    } else if (bkpinfo->backup_data)
     
    32453241        mr_msg(2,
    32463242                "Not verifying again. Per-CD/ISO verification already carried out.");
    3247         paranoid_system
    3248             ("cat /tmp/changed.files.* > /tmp/changed.files 2> /dev/null");
     3243        sprintf(tmp, "cat %s/changed.files > %s/changed.files 2> /dev/null",bkpinfo->tmpdir, MINDI_CACHE);
     3244        paranoid_system(tmp);
    32493245    } else {
    32503246        g_current_media_number = cdno;
     
    32583254            }
    32593255            if (bkpinfo->backup_media_type != iso) {
    3260                 insist_on_this_cd_number(bkpinfo, cdno);
    3261             }
    3262             res = verify_cd_image(bkpinfo); // sets verify_data to FALSE if it's time to stop verifying
     3256                insist_on_this_cd_number(cdno);
     3257            }
     3258            res = verify_cd_image();    // sets verify_data to FALSE if it's time to stop verifying
    32633259            retval += res;
    32643260            if (res) {
    32653261                mr_asprintf(&tmp,
    3266                          "Warnings/errors were reported while checking %s #%d",
    3267                          bkpinfo->backup_media_string,
    3268                          g_current_media_number);
     3262                        "Warnings/errors were reported while checking %s #%d",
     3263                        media_descriptor_string(bkpinfo->backup_media_type),
     3264                        g_current_media_number);
    32693265                log_to_screen(tmp);
    32703266                mr_free(tmp);
     
    32733269        }
    32743270        mr_asprintf(&tmp,
    3275                  "grep 'afio: ' %s | sed 's/afio: //' | grep -vE '^/dev/.*$' >> /tmp/changed.files",
    3276                  MONDO_LOGFILE);
     3271                "grep 'afio: ' %s | sed 's/afio: //' | grep -vE '^/dev/.*$' >> %s/changed.files",
     3272                MONDO_LOGFILE, MINDI_CACHE);
    32773273        system(tmp);
    32783274        mr_free(tmp);
    32793275
    32803276        mr_asprintf(&tmp,
    3281                  "grep 'star: ' %s | sed 's/star: //' | grep -vE '^/dev/.*$' >> /tmp/changed.files",
    3282                  MONDO_LOGFILE);
     3277                "grep 'star: ' %s | sed 's/star: //' | grep -vE '^/dev/.*$' >> %s/changed.files",
     3278                MONDO_LOGFILE, MINDI_CACHE);
    32833279        system(tmp);
    32843280        mr_free(tmp);
     
    32873283        eject_device(bkpinfo->media_device);
    32883284    }
    3289     diffs = count_lines_in_file("/tmp/changed.files");
     3285    sprintf(tmp, "%s/changed.files", MINDI_CACHE);
     3286    diffs = count_lines_in_file(tmp);
    32903287
    32913288    if (diffs > 0) {
Note: See TracChangeset for help on using the changeset viewer.