Ignore:
Timestamp:
Sep 27, 2007, 12:21:18 PM (12 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/mondorestore/mondorestore.c

    r1639 r1663  
    3535
    3636extern void twenty_seconds_til_yikes(void);
     37
     38/* Reference to global bkpinfo */
     39struct s_bkpinfo *bkpinfo;
    3740
    3841/* For use in other programs (ex. XMondo) */
     
    205208 * @ingroup restoreGuiGroup
    206209 */
    207 int let_user_edit_the_mountlist(struct s_bkpinfo *bkpinfo,
    208                                 struct mountlist_itself *mountlist,
     210int let_user_edit_the_mountlist(struct mountlist_itself *mountlist,
    209211                                struct raidlist_itself *raidlist)
    210212{
     
    306308 */
    307309int
    308 catchall_mode(struct s_bkpinfo *bkpinfo,
    309               struct mountlist_itself *mountlist,
     310catchall_mode(struct mountlist_itself *mountlist,
    310311              struct raidlist_itself *raidlist)
    311312{
     
    321322    iamhere("post wrm");
    322323    if (c == 'I' || c == 'N' || c == 'C') {
    323         interactively_obtain_media_parameters_from_user(bkpinfo, FALSE);
     324        interactively_obtain_media_parameters_from_user(FALSE);
    324325    } else {
    325326        popup_and_OK(_("No restoring or comparing will take place today."));
     
    338339
    339340    if (bkpinfo->backup_media_type == iso) {
    340         if (iso_fiddly_bits(bkpinfo, (c == 'N') ? TRUE : FALSE)) {
     341        if (iso_fiddly_bits((c == 'N') ? TRUE : FALSE)) {
    341342            mr_msg(2,
    342343                    "catchall_mode --- iso_fiddly_bits returned w/ error");
     
    349350    if (c == 'I') {
    350351        mr_msg(2, "IM selected");
    351         retval += interactive_mode(bkpinfo, mountlist, raidlist);
     352        retval += interactive_mode(mountlist, raidlist);
    352353    } else if (c == 'N') {
    353354        mr_msg(2, "NM selected");
    354         retval += nuke_mode(bkpinfo, mountlist, raidlist);
     355        retval += nuke_mode(mountlist, raidlist);
    355356    } else if (c == 'C') {
    356357        mr_msg(2, "CM selected");
    357         retval += compare_mode(bkpinfo, mountlist, raidlist);
     358        retval += compare_mode(mountlist, raidlist);
    358359    }
    359360    return (retval);
     
    368369 **************************************************************************/
    369370
    370 static void clean_blkid(struct s_bkpinfo *bkpinfo) {
     371static void clean_blkid() {
    371372
    372373    char *tmp1 = NULL;
     
    396397 */
    397398int
    398 interactive_mode(struct s_bkpinfo *bkpinfo,
    399                  struct mountlist_itself *mountlist,
     399interactive_mode(struct mountlist_itself *mountlist,
    400400                 struct raidlist_itself *raidlist)
    401401{
     
    434434
    435435    iamhere("About to load config file");
    436     get_cfg_file_from_archive_or_bust(bkpinfo);
    437     read_cfg_file_into_bkpinfo(g_mondo_cfg_file, bkpinfo);
     436    get_cfg_file_from_archive_or_bust();
     437    read_cfg_file_into_bkpinfo(g_mondo_cfg_file);
    438438    iamhere("Done loading config file; resizing ML");
    439439    mr_asprintf(&tmp,bkpinfo->prefix);
     
    560560    {
    561561        mr_msg(1, "Restoring all data");
    562         retval += restore_everything(bkpinfo, NULL);
     562        retval += restore_everything(NULL);
    563563    } else if ((restore_all =
    564564             ask_me_yes_or_no
     
    567567        for (done = FALSE; !done;) {
    568568            unlink("/tmp/filelist.full");
    569             filelist = process_filelist_and_biggielist(bkpinfo);
     569            filelist = process_filelist_and_biggielist();
    570570            /* Now you have /tmp/tmpfs/filelist.restore-these and /tmp/tmpfs/biggielist.restore-these;
    571571               the former is a list of regular files; the latter, biggiefiles and imagedevs.
     
    587587                    strcpy(bkpinfo->restore_path, tmp1);
    588588                    mr_msg(1, "Restoring subset");
    589                     retval += restore_everything(bkpinfo, filelist);
     589                    retval += restore_everything(filelist);
    590590                    free_filelist(filelist);
    591591                } else {
     
    622622    }
    623623
    624     clean_blkid(bkpinfo);
     624    clean_blkid();
    625625    protect_against_braindead_sysadmins();
    626626    retval += unmount_all_devices(mountlist);
     
    671671 * Run an arbitrary restore mode (prompt the user), but from ISO images
    672672 * instead of real media.
    673  * @param bkpinfo The backup information structure. Most fields are used.
    674673 * @param mountlist The mountlist containing information about the user's partitions.
    675674 * @param raidlist The raidlist that goes with @p mountlist.
     
    678677 */
    679678int
    680 iso_mode(struct s_bkpinfo *bkpinfo,
    681          struct mountlist_itself *mountlist,
     679iso_mode(struct mountlist_itself *mountlist,
    682680         struct raidlist_itself *raidlist, bool nuke_me_please)
    683681{
     
    685683    int retval = 0;
    686684
    687     assert(bkpinfo != NULL);
    688685    assert(mountlist != NULL);
    689686    assert(raidlist != NULL);
    690     if (iso_fiddly_bits(bkpinfo, nuke_me_please)) {
     687    if (iso_fiddly_bits(nuke_me_please)) {
    691688        mr_msg(1, "iso_mode --- returning w/ error");
    692689        return (1);
     
    694691        c = which_restore_mode();
    695692        if (c == 'I' || c == 'N' || c == 'C') {
    696             interactively_obtain_media_parameters_from_user(bkpinfo,
    697                                                             FALSE);
     693            interactively_obtain_media_parameters_from_user(FALSE);
    698694        }
    699695        if (c == 'I') {
    700             retval += interactive_mode(bkpinfo, mountlist, raidlist);
     696            retval += interactive_mode(mountlist, raidlist);
    701697        } else if (c == 'N') {
    702             retval += nuke_mode(bkpinfo, mountlist, raidlist);
     698            retval += nuke_mode(mountlist, raidlist);
    703699        } else if (c == 'C') {
    704             retval += compare_mode(bkpinfo, mountlist, raidlist);
     700            retval += compare_mode(mountlist, raidlist);
    705701        } else {
    706702            log_to_screen(_("OK, I shan't restore/compare any files."));
     
    761757 */
    762758int
    763 nuke_mode(struct s_bkpinfo *bkpinfo,
    764           struct mountlist_itself *mountlist,
     759nuke_mode(struct mountlist_itself *mountlist,
    765760          struct raidlist_itself *raidlist)
    766761{
     
    778773    mr_msg(2, "nuke_mode --- starting");
    779774
    780     get_cfg_file_from_archive_or_bust(bkpinfo);
     775    get_cfg_file_from_archive_or_bust();
    781776    load_mountlist(mountlist, g_mountlist_fname);   // in case read_cfg_file_into_bkpinfo updated the mountlist
    782777#ifdef __FreeBSD__
     
    796791        if (ask_me_yes_or_no(tmp)) {
    797792            mr_free(tmp);
    798             retval = interactive_mode(bkpinfo, mountlist, raidlist);
     793            retval = interactive_mode(mountlist, raidlist);
    799794            call_me_after_the_nuke(retval);
    800795            return(retval);
     
    852847
    853848        if (ask_me_yes_or_no(_("Try in interactive mode instead?"))) {
    854             retval = interactive_mode(bkpinfo, mountlist, raidlist);
     849            retval = interactive_mode(mountlist, raidlist);
    855850            call_me_after_the_nuke(retval);
    856851            return(retval);
     
    869864    }
    870865    iamhere("Restoring everything");
    871     retval += restore_everything(bkpinfo, NULL);
     866    retval += restore_everything(NULL);
    872867    if (!run_boot_loader(FALSE)) {
    873868        mr_msg(1,
     
    875870        boot_loader_installed = TRUE;
    876871    }
    877     clean_blkid(bkpinfo);
     872    clean_blkid();
    878873    protect_against_braindead_sysadmins();
    879874    retval += unmount_all_devices(mountlist);
     
    910905 * @return 0 for success, or the number of errors encountered.
    911906 */
    912 int restore_to_live_filesystem(struct s_bkpinfo *bkpinfo)
     907int restore_to_live_filesystem()
    913908{
    914909    int retval = 0;
     
    932927        sleep(1);
    933928    }
    934     interactively_obtain_media_parameters_from_user(bkpinfo, FALSE);
     929    interactively_obtain_media_parameters_from_user(FALSE);
    935930    if (!bkpinfo->media_device) {
    936931        mr_msg(2, "Warning - failed to find media dev");
     
    944939    open_evalcall_form(_("Thinking..."));
    945940
    946     get_cfg_file_from_archive_or_bust(bkpinfo);
    947     read_cfg_file_into_bkpinfo(g_mondo_cfg_file, bkpinfo);
     941    get_cfg_file_from_archive_or_bust();
     942    read_cfg_file_into_bkpinfo(g_mondo_cfg_file);
    948943    load_mountlist(mountlist, g_mountlist_fname);   // in case read_cfg_file_into_bkpinfo
    949944
     
    951946    retval = load_mountlist(mountlist, g_mountlist_fname);
    952947    load_raidtab_into_raidlist(raidlist, RAIDTAB_FNAME);
    953     filelist = process_filelist_and_biggielist(bkpinfo);
     948    filelist = process_filelist_and_biggielist();
    954949    if (filelist) {
    955950        save_filelist(filelist, "/tmp/selected-files.txt");
     
    959954                                 bkpinfo->restore_path, MAX_STR_LEN)) {
    960955            iamhere("Restoring everything");
    961             retval += restore_everything(bkpinfo, filelist);
     956            retval += restore_everything(filelist);
    962957        }
    963958        free_filelist(filelist);
     
    10061001 */
    10071002int
    1008 restore_a_biggiefile_from_CD(struct s_bkpinfo *bkpinfo,
    1009                              long bigfileno,
     1003restore_a_biggiefile_from_CD(long bigfileno,
    10101004                             struct s_node *filelist,
    10111005                             char *pathname_of_last_file_restored)
     
    11781172                    bkpinfo->backup_media_string,
    11791173                    g_current_media_number);
    1180             insist_on_this_cd_number(bkpinfo, g_current_media_number);
     1174            insist_on_this_cd_number(g_current_media_number);
    11811175            log_to_screen(_("Continuing to restore."));
    11821176        } else {
     
    13071301 * @return 0 for success (or skip), nonzero for failure.
    13081302 */
    1309 int restore_a_biggiefile_from_stream(struct s_bkpinfo *bkpinfo, char *orig_bf_fname, long biggiefile_number, char *orig_checksum,   //UNUSED
     1303int restore_a_biggiefile_from_stream(char *orig_bf_fname, long biggiefile_number, char *orig_checksum,  //UNUSED
    13101304                                     long long biggiefile_size, //UNUSED
    13111305                                     struct s_node *filelist,
     
    14741468        if (current_slice_number == 0) {
    14751469            res =
    1476                 read_file_from_stream_to_file(bkpinfo,
    1477                                               "/tmp/biggie-blah.txt",
     1470                read_file_from_stream_to_file("/tmp/biggie-blah.txt",
    14781471                                              slice_siz);
    14791472            if (!(fin = fopen("/tmp/biggie-blah.txt", "r"))) {
     
    14911484        } else {
    14921485            res =
    1493                 read_file_from_stream_to_stream(bkpinfo, pout, slice_siz);
     1486                read_file_from_stream_to_stream(pout, slice_siz);
    14941487        }
    14951488        retval += res;
     
    17761769 */
    17771770int
    1778 restore_a_tarball_from_stream(struct s_bkpinfo *bkpinfo,
    1779                               char *tarball_fname,
     1771restore_a_tarball_from_stream(char *tarball_fname,
    17801772                              long current_tarball_number,
    17811773                              struct s_node *filelist,
     
    18171809    mr_asprintf(&filelist_subset_fname, "%s/filelist-subset-%ld.tmp",
    18181810            bkpinfo->tmpdir, current_tarball_number);
    1819     res = read_file_from_stream_to_file(bkpinfo, afio_fname, size);
     1811    res = read_file_from_stream_to_file(afio_fname, size);
    18201812    if (strstr(tarball_fname, ".star")) {
    18211813        bkpinfo->use_star = TRUE;
     
    19511943 */
    19521944int
    1953 restore_all_biggiefiles_from_CD(struct s_bkpinfo *bkpinfo,
    1954                                 struct s_node *filelist)
     1945restore_all_biggiefiles_from_CD(struct s_node *filelist)
    19551946{
    19561947    int retval = 0;
     
    20182009                        "I'll continue to scan this CD for bigfiles to be restored.");
    20192010            } else if (does_file_exist(MNT_CDROM "/archives/NOT-THE-LAST")) {
    2020                 insist_on_this_cd_number(bkpinfo,
    2021                                          ++g_current_media_number);
     2011                insist_on_this_cd_number(++g_current_media_number);
    20222012                log_to_screen(_("Restoring from %s #%d"),
    2023                         bkpinfo->backup_media_string,
     2013                        media_descriptor_string(bkpinfo->backup_media_type),
    20242014                        g_current_media_number);
    20252015                just_changed_cds = TRUE;
     
    20372027
    20382028            res =
    2039                 restore_a_biggiefile_from_CD(bkpinfo, bigfileno, filelist,
    2040                                              pathname_of_last_biggie_restored);
     2029                restore_a_biggiefile_from_CD(bigfileno, filelist, pathname_of_last_biggie_restored);
    20412030            iamhere(pathname_of_last_biggie_restored);
    20422031            if (fbw && pathname_of_last_biggie_restored[0]) {
     
    20972086 */
    20982087int
    2099 restore_all_tarballs_from_CD(struct s_bkpinfo *bkpinfo,
    2100                              struct s_node *filelist)
     2088restore_all_tarballs_from_CD(struct s_node *filelist)
    21012089{
    21022090    int retval = 0;
     
    21262114        g_current_media_number = 1;
    21272115    }
    2128     insist_on_this_cd_number(bkpinfo, g_current_media_number);
     2116    insist_on_this_cd_number(g_current_media_number);
    21292117    read_cfg_var(g_mondo_cfg_file, "last-filelist-number", tmp1);
    21302118    max_val = atol(tmp1) + 1;
     
    21402128                       progress_str, max_val);
    21412129    for (;;) {
    2142         insist_on_this_cd_number(bkpinfo, g_current_media_number);
     2130        insist_on_this_cd_number(g_current_media_number);
    21432131        update_progress_form(progress_str);
    21442132        mr_asprintf(&tarball_fname, MNT_CDROM "/archives/%ld.afio.bz2",
     
    22522240 */
    22532241int
    2254 restore_all_biggiefiles_from_stream(struct s_bkpinfo *bkpinfo,
    2255                                     struct s_node *filelist)
     2242restore_all_biggiefiles_from_stream(struct s_node *filelist)
    22562243{
    22572244    long noof_biggiefiles = 0L;
     
    23062293    if (ctrl_chr == BLK_START_EXTENDED_ATTRIBUTES) {
    23072294        res =
    2308             read_EXAT_files_from_tape(bkpinfo, &biggie_size, biggie_fname,
     2295            read_EXAT_files_from_tape(&biggie_size, biggie_fname,
    23092296                                      &ctrl_chr, xattr_fname, acl_fname);
    23102297    }
     
    23422329        mr_free(tmp);
    23432330
    2344         res = restore_a_biggiefile_from_stream(bkpinfo, biggie_fname,
     2331        res = restore_a_biggiefile_from_stream(biggie_fname,
    23452332                                               current_bigfile_number,
    23462333                                               biggie_cksum,
     
    24282415 */
    24292416int
    2430 restore_all_tarballs_from_stream(struct s_bkpinfo *bkpinfo,
    2431                                  struct s_node *filelist)
     2417restore_all_tarballs_from_stream(struct s_node *filelist)
    24322418{
    24332419    int retval = 0;
     
    24932479            iamhere("Reading EXAT files from tape");
    24942480            res =
    2495                 read_EXAT_files_from_tape(bkpinfo, &tmp_size, tmp_fname,
     2481                read_EXAT_files_from_tape(&tmp_size, tmp_fname,
    24962482                                          &ctrl_chr, xattr_fname,
    24972483                                          acl_fname);
     
    25062492                */
    25072493        res =
    2508             restore_a_tarball_from_stream(bkpinfo, tmp_fname,
     2494            restore_a_tarball_from_stream(tmp_fname,
    25092495                                          current_afioball_number,
    25102496                                          filelist, tmp_size, xattr_fname,
     
    25682554 * @ingroup restoreGroup
    25692555 */
    2570 int restore_everything(struct s_bkpinfo *bkpinfo, struct s_node *filelist)
     2556int restore_everything(struct s_node *filelist)
    25712557{
    25722558    int resA;
     
    26022588    mvaddstr_and_log_it(g_currentY, 0, _("Preparing to read your archives"));
    26032589    if (IS_THIS_A_STREAMING_BACKUP(bkpinfo->backup_media_type)) {
    2604         mount_cdrom(bkpinfo);
     2590        mount_cdrom();
    26052591        mvaddstr_and_log_it(g_currentY++, 0,
    26062592                            _("Restoring OS and data from streaming media"));
    26072593        if (bkpinfo->backup_media_type == cdstream) {
    2608             openin_cdstream(bkpinfo);
     2594            openin_cdstream();
    26092595        } else {
    2610             assert_string_is_neither_NULL_nor_zerolength(bkpinfo->
    2611                                                          media_device);
    2612             openin_tape(bkpinfo);
    2613         }
    2614         resA = restore_all_tarballs_from_stream(bkpinfo, filelist);
    2615         resB = restore_all_biggiefiles_from_stream(bkpinfo, filelist);
     2596            assert_string_is_neither_NULL_nor_zerolength(bkpinfo->media_device);
     2597            openin_tape();
     2598        }
     2599        resA = restore_all_tarballs_from_stream(filelist);
     2600        resB = restore_all_biggiefiles_from_stream(filelist);
    26162601        if (bkpinfo->backup_media_type == cdstream) {
    2617             closein_cdstream(bkpinfo);
     2602            closein_cdstream();
    26182603        } else {
    2619             closein_tape(bkpinfo);
     2604            closein_tape();
    26202605        }
    26212606    } else {
    26222607        mvaddstr_and_log_it(g_currentY++, 0,
    26232608                            _("Restoring OS and data from CD       "));
    2624         mount_cdrom(bkpinfo);
    2625         resA = restore_all_tarballs_from_CD(bkpinfo, filelist);
    2626         resB = restore_all_biggiefiles_from_CD(bkpinfo, filelist);
     2609        mount_cdrom();
     2610        resA = restore_all_tarballs_from_CD(filelist);
     2611        resB = restore_all_biggiefiles_from_CD(filelist);
    26272612    }
    26282613    chdir(cwd);
     
    26512636 */
    26522637int
    2653 restore_live_from_monitas_server(struct s_bkpinfo *bkpinfo,
    2654                                  char *monitas_device,
     2638restore_live_from_monitas_server(char *monitas_device,
    26552639                                 char *restore_this_directory,
    26562640                                 char *restore_here)
     
    27242708
    27252709    unlink(datadisks_fname);
    2726     read_cfg_file_into_bkpinfo(g_mondo_cfg_file, bkpinfo);
     2710    read_cfg_file_into_bkpinfo(g_mondo_cfg_file);
    27272711    retval = load_mountlist(&the_mountlist, g_mountlist_fname); // in case read_cfg_file_into_bkpinfo   strcpy(bkpinfo->media_device, monitas_device);
    27282712
     
    27512735    run_program_and_log_output(command, FALSE);
    27522736//  filelist = load_filelist(g_filelist_restthese);  // FIXME --- this probably doesn't work because it doesn't include the biggiefiles
    2753     retval += restore_everything(bkpinfo, filelist);
     2737    retval += restore_everything(filelist);
    27542738    free_filelist(filelist);
    27552739    mr_msg(2, "--------End of restore_live_from_monitas_server--------");
     
    28202804    struct mountlist_itself *mountlist = NULL;
    28212805    struct raidlist_itself *raidlist = NULL;
    2822     struct s_bkpinfo *bkpinfo = NULL;
    28232806    struct s_node *filelist = NULL;
    28242807    char *a = NULL, *b = NULL;
     
    28402823    mr_conf = mr_malloc(sizeof(struct mr_rs_conf));
    28412824    mr_rs_reset_conf(mr_conf);
     2825    bkpinfo = mr_malloc(sizeof(struct s_bkpinfo));
     2826    reset_bkpinfo();
    28422827
    28432828    mr_conf->log_level = DEFAULT_MR_LOGLEVEL;
     
    28592844        g_text_mode = FALSE;
    28602845    }                           // newt :-)
    2861     bkpinfo = mr_malloc(sizeof(struct s_bkpinfo));
    28622846    mountlist = mr_malloc(sizeof(struct mountlist_itself));
    28632847    raidlist = mr_malloc(sizeof(struct raidlist_itself));
     
    28732857    malloc_string(a);
    28742858    malloc_string(b);
    2875     setup_MR_global_filenames(bkpinfo); // malloc() and set globals, using bkpinfo->tmpdir etc.
    2876     reset_bkpinfo(bkpinfo);
     2859    setup_MR_global_filenames();    // malloc() and set globals, using bkpinfo->tmpdir etc.
    28772860    bkpinfo->backup_media_type = none;  // in case boot disk was made for one backup type but user wants to restore from another backup type
    28782861    strcpy(bkpinfo->backup_media_string,"");
     
    29092892
    29102893/* Init directories */
    2911     make_hole_for_dir(bkpinfo->tmpdir);
    2912     mr_asprintf(&tmp, "mkdir -p %s", bkpinfo->tmpdir);
    2913     run_program_and_log_output(tmp, FALSE);
    2914     mr_free(tmp);
    2915 
    29162894    make_hole_for_dir("/var/log");
    29172895    make_hole_for_dir("/tmp/tmpfs");    /* just in case... */
     
    29432921            strcpy(g_mountlist_fname, "/tmp/mountlist.txt");
    29442922        }
    2945         res = let_user_edit_the_mountlist(bkpinfo, mountlist, raidlist);
     2923        res = let_user_edit_the_mountlist(mountlist, raidlist);
    29462924#ifdef __FreeBSD__
    29472925        system("mv -f /etc/raidtab /tmp/raidconf.txt");
     
    29772955
    29782956        malloc_string(tmp);
    2979         restore_a_biggiefile_from_CD(bkpinfo, 42, NULL, tmp);
     2957        restore_a_biggiefile_from_CD(42, NULL, tmp);
    29802958        mr_free(tmp);
    29812959    }
     
    30773055        if (argc == 5 && strcmp(argv[1], "--monitas-live") == 0) {
    30783056            retval =
    3079                 restore_live_from_monitas_server(bkpinfo,
    3080                                                  argv[2],
     3057                restore_live_from_monitas_server(argv[2],
    30813058                                                 argv[3], argv[4]);
    30823059        } else {
    30833060            mr_msg(2, "Calling restore_to_live_filesystem()");
    3084             retval = restore_to_live_filesystem(bkpinfo);
     3061            retval = restore_to_live_filesystem();
    30853062        }
    30863063        mr_msg(2, "Still here. Yay.");
     
    31033080        iamhere("About to call load_mountlist and load_raidtab");
    31043081        strcpy(bkpinfo->restore_path, MNT_RESTORING);
    3105         read_cfg_file_into_bkpinfo(g_mondo_cfg_file, bkpinfo);
     3082        read_cfg_file_into_bkpinfo(g_mondo_cfg_file);
    31063083        retval = load_mountlist(mountlist, g_mountlist_fname);
    31073084        retval += load_raidtab_into_raidlist(raidlist, RAIDTAB_FNAME);
     
    31633140        if (argc == 2 && strcmp(argv[1], "--nuke") == 0) {
    31643141            iamhere("nuking");
    3165             retval += nuke_mode(bkpinfo, mountlist, raidlist);
     3142            retval += nuke_mode(mountlist, raidlist);
    31663143        } else if (argc == 2 && strcmp(argv[1], "--interactive") == 0) {
    31673144            iamhere("catchall");
    3168             retval += catchall_mode(bkpinfo, mountlist, raidlist);
     3145            retval += catchall_mode(mountlist, raidlist);
    31693146        } else if (argc == 2 && strcmp(argv[1], "--compare") == 0) {
    31703147            iamhere("compare");
    3171             retval += compare_mode(bkpinfo, mountlist, raidlist);
     3148            retval += compare_mode(mountlist, raidlist);
    31723149        } else if (argc == 2 && strcmp(argv[1], "--iso") == 0) {
    31733150            iamhere("iso");
    3174             retval = iso_mode(bkpinfo, mountlist, raidlist, FALSE);
     3151            retval = iso_mode(mountlist, raidlist, FALSE);
    31753152        } else if (argc == 2 && strcmp(argv[1], "--mbr") == 0) {
    31763153            iamhere("mbr");
     
    31853162        } else if (argc == 2 && strcmp(argv[1], "--isonuke") == 0) {
    31863163            iamhere("isonuke");
    3187             retval = iso_mode(bkpinfo, mountlist, raidlist, TRUE);
     3164            retval = iso_mode(mountlist, raidlist, TRUE);
    31883165        } else if (argc != 1) {
    31893166            log_to_screen(_("Invalid parameters"));
     
    31913168        } else {
    31923169            iamhere("catchall (no mode specified in command-line call");
    3193             retval += catchall_mode(bkpinfo, mountlist, raidlist);
     3170            retval += catchall_mode(mountlist, raidlist);
    31943171        }
    31953172    }
     
    31973174    /* clean up at the end */
    31983175    if (retval) {
    3199         if (does_file_exist("/tmp/changed.files")) {
     3176        if (does_file_exist(MINDI_CACHE"/changed.files")) {
    32003177            log_to_screen
    3201                 (_("See /tmp/changed.files for list of files that have changed."));
     3178                (_("See "MINDI_CACHE"/changed.files for list of files that have changed."));
    32023179        }
    32033180        mvaddstr_and_log_it(g_currentY++,
Note: See TracChangeset for help on using the changeset viewer.