Changeset 1086 in MondoRescue for trunk/mondo/src/mondorestore


Ignore:
Timestamp:
Feb 2, 2007, 11:21:27 PM (17 years ago)
Author:
Bruno Cornec
Message:

log_msg => mr_msg in trunk

Location:
trunk/mondo/src/mondorestore
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/mondo/src/mondorestore/mondo-prep.c

    r1081 r1086  
    6868                     drivelist->el[lino].device, MONDO_WAS_HERE);
    6969            if (!run_program_and_log_output(command, 1)) {
    70                 log_msg(1, "Found MONDO_WAS_HERE marker on drive#%d (%s)",
     70                mr_msg(1, "Found MONDO_WAS_HERE marker on drive#%d (%s)",
    7171                        lino, drivelist->el[lino].device);
    7272                mr_free(command);
     
    9090                fout = fopen(drivelist->el[lino].device, "w+");
    9191                if (!fout) {
    92                     log_msg(1, "Unable to open+wipe %s",
     92                    mr_msg(1, "Unable to open+wipe %s",
    9393                            drivelist->el[lino].device);
    9494                } else {
    9595                    if (1 != fwrite(buf, strlen(buf)+1, 1, fout)) {
    96                         log_msg(1, "Failed to wipe %s",
     96                        mr_msg(1, "Failed to wipe %s",
    9797                                drivelist->el[lino].device);
    9898                    } else {
    99                         log_msg(1, "Successfully wiped %s",
     99                        mr_msg(1, "Successfully wiped %s",
    100100                                drivelist->el[lino].device);
    101101                    }
     
    114114    }
    115115// Still here? Cool!
    116     log_msg(1, "Cool. I didn't have to wipe anything.");
     116    mr_msg(1, "Cool. I didn't have to wipe anything.");
    117117}
    118118
     
    126126        return (-1);
    127127    }
    128     log_msg(5, "Writing string '%s', one char at a time", str);
     128    mr_msg(5, "Writing string '%s', one char at a time", str);
    129129    j = strlen(str);
    130130    for (i = 0; i < j; i++) {
    131         log_msg(6, "Writing %d ('%c')", str[i], str[i]);
     131        mr_msg(6, "Writing %d ('%c')", str[i], str[i]);
    132132        if ((fq = fopen(FDISK_LOG, "a+"))) {
    133133            fputc(str[i], fq);
     
    141141        }
    142142    }
    143     log_msg(5, "Returning");
     143    mr_msg(5, "Returning");
    144144
    145145    return (i);
     
    198198
    199199    iamhere("STARTING");
    200     log_msg(1, "OK, opened i-want-my-lvm. Shutting down LVM volumes...");
     200    mr_msg(1, "OK, opened i-want-my-lvm. Shutting down LVM volumes...");
    201201    tmp = find_home_of_exe("lvm");
    202202    if (tmp)    // found it :) cool
     
    239239    if (just_erase_existing_volumes) {
    240240        paranoid_fclose(fin);
    241         log_msg(1, "Closed i-want-my-lvm. Finished erasing LVMs.");
     241        mr_msg(1, "Closed i-want-my-lvm. Finished erasing LVMs.");
    242242        sync();
    243243        sync();
     
    245245        sleep(1);
    246246        iamhere("ENDING");
    247         log_msg(1, "Not many errors. Returning 0.");
     247        mr_msg(1, "Not many errors. Returning 0.");
    248248        return (0);
    249249    }
    250250
    251     log_msg(1, "OK, rewound i-want-my-lvm. Doing funky stuff...");
     251    mr_msg(1, "OK, rewound i-want-my-lvm. Doing funky stuff...");
    252252    rewind(fin);
    253253    for (mr_getline(&incoming, &n1, fin); !feof(fin); mr_getline(&incoming, &n1, fin)) {
     
    286286            for (q = tmp1; *q > 32; q++);
    287287            *q = '\0';
    288             log_msg(1, "Deleting old entries at /dev/%s", tmp1);
     288            mr_msg(1, "Deleting old entries at /dev/%s", tmp1);
    289289            mr_asprintf(&tmp, "rm -Rf /dev/%s", tmp1);
    290290            mr_free(tmp1);
     
    295295            run_program_and_log_output(vgscan_sz, 1);
    296296            run_program_and_log_output(pvscan_sz, 1);
    297             log_msg(3,
     297            mr_msg(3,
    298298                    "After working around potentially broken i-want-my-lvm, incoming[] is now '%s'",
    299299                    incoming);
     
    311311            res = run_program_and_log_output(command, 5);
    312312        }
    313         log_msg(0, "%s --> %d", command, res);
     313        mr_msg(0, "%s --> %d", command, res);
    314314        if (res > 0) {
    315315            res = 1;
     
    333333            for (p = tmp; *p != '\0' && !isdigit(*p); p++);
    334334            extents = atol(p);
    335             log_msg(5, "p='%s' --> extents=%ld", p, extents);
     335            mr_msg(5, "p='%s' --> extents=%ld", p, extents);
    336336            mr_free(tmp);
    337337
    338338            p = strstr(command, "-L");
    339339            if (!p) {
    340                 log_msg(0, "Fiddlesticks. '%s' returned %d", command, res);
     340                mr_msg(0, "Fiddlesticks. '%s' returned %d", command, res);
    341341            } else {
    342342                if (lvmversion == 2) {
     
    363363                    *(p + i) = ' ';
    364364                }
    365                 log_msg(5, "Retrying with '%s'", command);
     365                mr_msg(5, "Retrying with '%s'", command);
    366366                res = run_program_and_log_output(command, 5);
    367367                if (res > 0) {
     
    371371                    fprintf(g_fprep, "%s\n", command);
    372372                }
    373                 log_msg(0, "%s --> %d", command, res);
     373                mr_msg(0, "%s --> %d", command, res);
    374374                if (!res) {
    375                     log_msg(5, "YAY! This time, it succeeded.");
     375                    mr_msg(5, "YAY! This time, it succeeded.");
    376376                }
    377377            }
    378378        }
    379379        if (strstr(command, "vgcreate")) {
    380             log_msg(0, "In case you're interested...");
     380            mr_msg(0, "In case you're interested...");
    381381            run_program_and_log_output(vgscan_sz, 1);
    382382            run_program_and_log_output(pvscan_sz, 1);
     
    396396    mr_free(incoming);
    397397
    398     log_msg(1, "Closed i-want-my-lvm. Finished doing funky stuff.");
     398    mr_msg(1, "Closed i-want-my-lvm. Finished doing funky stuff.");
    399399    sync();
    400400    sync();
     
    403403    iamhere("ENDING");
    404404    if (retval > 2) {
    405         log_msg(1, "%d errors. I'm reporting this.", retval);
     405        mr_msg(1, "%d errors. I'm reporting this.", retval);
    406406        return (retval);
    407407    } else {
    408         log_msg(1, "Not many errors. Returning 0.");
     408        mr_msg(1, "Not many errors. Returning 0.");
    409409        return (0);
    410410    }
     
    550550  // leave straight away if raidlist is initial or has no entries
    551551  if (!raidlist || raidlist->entries == 0) {
    552     log_msg(1, "No RAID arrays found.");
     552    mr_msg(1, "No RAID arrays found.");
    553553    return 1;
    554554  } else {
    555     log_msg(1, "%d RAID arrays found.", raidlist->entries);
     555    mr_msg(1, "%d RAID arrays found.", raidlist->entries);
    556556  }
    557557  // find raidlist entry for requested device
     
    561561  // check whether RAID device was found in raidlist
    562562  if (i == raidlist->entries) {
    563     log_msg(1, "RAID device %s not found in list.", device);
     563    mr_msg(1, "RAID device %s not found in list.", device);
    564564    return 1;
    565565  }
     
    805805        */
    806806
    807         log_msg(1, "Making %s", device);
     807        mr_msg(1, "Making %s", device);
    808808        // use mkraid if it exists, otherwise use mdadm
    809809        if (run_program_and_log_output("which mkraid", FALSE)) {
    810810            res = create_raid_device_via_mdadm(raidlist, device);
    811             log_msg(1, "Creating RAID device %s via mdadm returned %d",
     811            mr_msg(1, "Creating RAID device %s via mdadm returned %d",
    812812                    device, res);
    813813        } else {
    814814            mr_asprintf(&program, "mkraid --really-force %s", device);
    815815            res = run_program_and_log_output(program, 1);
    816             log_msg(1, "%s returned %d", program, res);
     816            mr_msg(1, "%s returned %d", program, res);
    817817            sync();
    818818            sleep(3);
     
    834834
    835835    if (!strcmp(format, "lvm")) {
    836         log_msg(1, "Don't format %s - it's part of an lvm volume", device);
     836        mr_msg(1, "Don't format %s - it's part of an lvm volume", device);
    837837        return (0);
    838838    }
     
    937937// start soft-raids now (because LVM might depend on them)
    938938// ...and for simplicity's sake, let's format them at the same time :)
    939     log_msg(1, "Stopping all RAID devices");
     939    mr_msg(1, "Stopping all RAID devices");
    940940    stop_all_raid_devices(mountlist);
    941941    sync();
     
    943943    sync();
    944944    sleep(2);
    945     log_msg(1, "Prepare soft-RAIDs");   // prep and format too
     945    mr_msg(1, "Prepare soft-RAIDs");    // prep and format too
    946946    for (lino = 0; lino < mountlist->entries; lino++) {
    947947        me = &mountlist->el[lino];  // the current mountlist entry
    948         log_msg(2, "Examining %s", me->device);
     948        mr_msg(2, "Examining %s", me->device);
    949949        if (!strncmp(me->device, "/dev/md", 7)) {
    950950            if (interactively) {
     
    974974//  sleep(5);
    975975// do LVMs now
    976     log_msg(1, "Creating LVMs");
     976    mr_msg(1, "Creating LVMs");
    977977    if (does_file_exist("/tmp/i-want-my-lvm")) {
    978978        wait_until_software_raids_are_prepped("/proc/mdstat", 100);
     
    997997// do regulars at last
    998998    sleep(2);                   // woo!
    999     log_msg(1, "Formatting regulars");
     999    mr_msg(1, "Formatting regulars");
    10001000    for (lino = 0; lino < mountlist->entries; lino++) {
    10011001        me = &mountlist->el[lino];  // the current mountlist entry
     
    16771677        sync();
    16781678        paranoid_pclose(pout_to_fdisk);
    1679         log_msg(0,
     1679        mr_msg(0,
    16801680                "------------------- fdisk.log looks like this ------------------");
    16811681        mr_asprintf(&tmp, "cat %s >> %s", FDISK_LOG, MONDO_LOGFILE);
     
    16831683        mr_free(tmp);
    16841684
    1685         log_msg(0,
     1685        mr_msg(0,
    16861686                "------------------- end of fdisk.log... word! ------------------");
    16871687        mr_asprintf(&tmp, "tail -n6 %s | grep -F \"16: \"", FDISK_LOG);
     
    18031803    if (partsize > 0) {
    18041804        if (!strcmp(format, "7")) {
    1805             log_msg(1, "Adding 512K, just in case");
     1805            mr_msg(1, "Adding 512K, just in case");
    18061806            partsize += 512;
    18071807        }
     
    18291829
    18301830    if (pout_to_fdisk) {
    1831         log_msg(1, "Doing the new all-in-one fdisk thing");
    1832         log_msg(1, "output = '%s'", output);
     1831        mr_msg(1, "Doing the new all-in-one fdisk thing");
     1832        mr_msg(1, "output = '%s'", output);
    18331833        fput_string_one_char_at_a_time(pout_to_fdisk, output);
    18341834        fput_string_one_char_at_a_time(pout_to_fdisk, "\n\np\n");
    18351835        tmp = last_line_of_file(FDISK_LOG);
    18361836        if (strstr(tmp, " (m ")) {
    1837             log_msg(1, "Successfully created %s%d", drive, partno);
     1837            mr_msg(1, "Successfully created %s%d", drive, partno);
    18381838        } else {
    1839             log_msg(1, "last line = %s", tmp);
    1840             log_msg(1, "Failed to create %s%d; sending 'Enter'...", drive,
     1839            mr_msg(1, "last line = %s", tmp);
     1840            mr_msg(1, "Failed to create %s%d; sending 'Enter'...", drive,
    18411841                    partno);
    18421842        }
     
    18441844
    18451845        if (!retval) {
    1846             log_msg(1, "Trying to set %s%d's partition type now", drive,
     1846            mr_msg(1, "Trying to set %s%d's partition type now", drive,
    18471847                    partno);
    18481848            retval =
     
    18501850                                   partsize);
    18511851            if (retval) {
    1852                 log_msg(1, "Failed. Trying again...");
     1852                mr_msg(1, "Failed. Trying again...");
    18531853                retval =
    18541854                    set_partition_type(pout_to_fdisk, drive, partno,
     
    18571857        }
    18581858        if (retval) {
    1859             log_msg(1, "...but failed to set type");
     1859            mr_msg(1, "...but failed to set type");
    18601860        }
    18611861    } else {
     
    19591959        /*      mountlist=&new_mtlist; */
    19601960        /*      extrapolate_mountlist_to_include_raid_partitions(mountlist,orig_mtlist); */
    1961         log_msg(0,
     1961        mr_msg(0,
    19621962                "Mountlist, including the partitions incorporated in RAID devices:-");
    19631963        for (i = 0; i < mountlist->entries; i++) {
    19641964            log_it(mountlist->el[i].device);
    19651965        }
    1966         log_msg(0, "End of mountlist.");
    1967     }
    1968     log_msg(0, "Stopping all LVMs, just in case");
     1966        mr_msg(0, "End of mountlist.");
     1967    }
     1968    mr_msg(0, "Stopping all LVMs, just in case");
    19691969    if (!g_text_mode) {
    19701970        newtSuspend();
     
    19741974        newtResume();
    19751975    }
    1976     log_msg(0, "Stopping all software RAID devices, just in case");
     1976    mr_msg(0, "Stopping all software RAID devices, just in case");
    19771977    stop_all_raid_devices(mountlist);
    1978     log_msg(0, "Done.");
     1978    mr_msg(0, "Done.");
    19791979
    19801980/* 
     
    20962096    mr_free(partition);
    20972097
    2098     log_msg(1, tmp);
     2098    mr_msg(1, tmp);
    20992099    mr_free(tmp);
    21002100    if (partcode[0] != '\0' && strcmp(partcode, "83")) {    /* no need to set type if 83: 83 is default */
     
    21062106            if (partno > 1
    21072107                || strstr(tmp1, " (1-4)")) {
    2108                 log_msg(5, "Specifying partno (%d) - yay", partno);
     2108                mr_msg(5, "Specifying partno (%d) - yay", partno);
    21092109                mr_asprintf(&tmp, "%d\n", partno);
    21102110                fput_string_one_char_at_a_time(pout_to_fdisk, tmp);
     
    21122112                mr_free(tmp1);
    21132113                tmp1 = last_line_of_file(FDISK_LOG);
    2114                 log_msg(5, "A - last line = '%s'", tmp1);
     2114                mr_msg(5, "A - last line = '%s'", tmp1);
    21152115            }
    21162116            mr_free(tmp1);
     
    21202120            mr_free(tmp);
    21212121            tmp1 = last_line_of_file(FDISK_LOG);
    2122             log_msg(5, "B - last line = '%s'",tmp1);
     2122            mr_msg(5, "B - last line = '%s'",tmp1);
    21232123            mr_free(tmp1);
    21242124
    21252125            fput_string_one_char_at_a_time(pout_to_fdisk, "\n");
    21262126            tmp1 = last_line_of_file(FDISK_LOG);
    2127             log_msg(5, "C - last line = '%s'",tmp1);
     2127            mr_msg(5, "C - last line = '%s'",tmp1);
    21282128            mr_free(tmp1);
    21292129
    21302130            tmp = last_line_of_file(FDISK_LOG);
    21312131            if (!strstr(tmp, " (m ")) {
    2132                 log_msg(1, "last line = '%s'; part type set failed", tmp);
     2132                mr_msg(1, "last line = '%s'; part type set failed", tmp);
    21332133                res++;
    21342134                fput_string_one_char_at_a_time(pout_to_fdisk, "\n");
     
    21402140            mr_asprintf(&command, "parted2fdisk %s >> %s 2>> %s", drive,
    21412141                    MONDO_LOGFILE, MONDO_LOGFILE);
    2142             log_msg(5, "output = '%s'", output);
    2143             log_msg(5, "partno=%d; partcode=%s", partno, partcode);
    2144             log_msg(5, "command = '%s'", command);
     2142            mr_msg(5, "output = '%s'", output);
     2143            mr_msg(5, "partno=%d; partcode=%s", partno, partcode);
     2144            mr_msg(5, "command = '%s'", command);
    21452145            fout = popen(command, "w");
    21462146            if (!fout) {
     
    21892189    mr_asprintf(&program, "raidstart %s", raid_device);
    21902190#endif
    2191     log_msg(1, "program = %s", program);
     2191    mr_msg(1, "program = %s", program);
    21922192    res = run_program_and_log_output(program, 1);
    21932193    if (g_fprep) {
     
    21972197
    21982198    if (res) {
    2199         log_msg(1, "Warning - failed to start RAID device %s",
     2199        mr_msg(1, "Warning - failed to start RAID device %s",
    22002200                raid_device);
    22012201    }
     
    22382238    }
    22392239#endif
    2240     log_msg(1, "program = %s", program);
     2240    mr_msg(1, "program = %s", program);
    22412241    res = run_program_and_log_output(program, 1);
    22422242    if (g_fprep) {
     
    22462246
    22472247    if (res) {
    2248         log_msg(1, "Warning - failed to stop RAID device %s", raid_device);
     2248        mr_msg(1, "Warning - failed to stop RAID device %s", raid_device);
    22492249    }
    22502250    retval += res;
     
    22632263            (mountlist->el[i].device, RAID_DEVICE_STUB,
    22642264             strlen(RAID_DEVICE_STUB))) {
    2265             log_msg(1, "Starting %s", mountlist->el[i].device);
     2265            mr_msg(1, "Starting %s", mountlist->el[i].device);
    22662266            res = start_raid_device(mountlist->el[i].device);
    22672267            retval += res;
     
    22692269    }
    22702270    if (retval) {
    2271         log_msg(1, "Started all s/w raid devices OK");
     2271        mr_msg(1, "Started all s/w raid devices OK");
    22722272    } else {
    2273         log_msg(1, "Failed to start some/all s/w raid devices");
     2273        mr_msg(1, "Failed to start some/all s/w raid devices");
    22742274    }
    22752275    return (retval);
     
    23462346    paranoid_fclose(fin);
    23472347    if (retval) {
    2348         log_msg(1, "Warning - unable to stop some RAID devices");
     2348        mr_msg(1, "Warning - unable to stop some RAID devices");
    23492349    }
    23502350    sync();
     
    25482548
    25492549        if (!strcmp(drivemntlist->el[partno]->mountpoint, "image")) {
    2550             log_msg(1, "Skipping %s (%s) because it's an image",
     2550            mr_msg(1, "Skipping %s (%s) because it's an image",
    25512551                    drivemntlist->el[partno]->device,
    25522552                    drivemntlist->el[partno]->mountpoint);
     
    26262626    assert(drivemntlist != NULL);
    26272627
    2628     log_msg(1, "Creating list of partitions for drive %s", drive_name);
     2628    mr_msg(1, "Creating list of partitions for drive %s", drive_name);
    26292629
    26302630    mr_asprintf(&tmp_drive_name,drive_name);
  • trunk/mondo/src/mondorestore/mondo-restore.c

    r1081 r1086  
    155155    int retval = 0, res = 0;
    156156
    157     log_msg(2, "let_user_edit_the_mountlist() --- starting");
     157    mr_msg(2, "let_user_edit_the_mountlist() --- starting");
    158158
    159159    assert(bkpinfo != NULL);
     
    162162    if (!bkpinfo->disaster_recovery) {
    163163        mr_allocstr(g_mountlist_fname, "/tmp/mountlist.txt");
    164         log_msg(2, "I guess you're testing edit_mountlist()");
     164        mr_msg(2, "I guess you're testing edit_mountlist()");
    165165    }
    166166    if (!does_file_exist(g_mountlist_fname)) {
     
    207207    for (i = 0; i < mountlist->entries; i++) {
    208208        if (strstr(mountlist->el[i].format, "ompaq")) {
    209             log_msg(2, "mountlist[%d] (%s) is %s (Compaq alert!)",
     209            mr_msg(2, "mountlist[%d] (%s) is %s (Compaq alert!)",
    210210                    i, mountlist->el[i].device, mountlist->el[i].format);
    211211
     
    286286    if (bkpinfo->backup_media_type == iso) {
    287287        if (iso_fiddly_bits(bkpinfo, (c == 'N') ? TRUE : FALSE)) {
    288             log_msg(2,
     288            mr_msg(2,
    289289                    "catchall_mode --- iso_fiddly_bits returned w/ error");
    290290            return (1);
    291291        } else {
    292             log_msg(2, "catchall_mode --- iso_fiddly_bits ok");
     292            mr_msg(2, "catchall_mode --- iso_fiddly_bits ok");
    293293        }
    294294    }
    295295
    296296    if (c == 'I') {
    297         log_msg(2, "IM selected");
     297        mr_msg(2, "IM selected");
    298298        retval += interactive_mode(bkpinfo, mountlist, raidlist);
    299299    } else if (c == 'N') {
    300         log_msg(2, "NM selected");
     300        mr_msg(2, "NM selected");
    301301        retval += nuke_mode(bkpinfo, mountlist, raidlist);
    302302    } else if (c == 'C') {
    303         log_msg(2, "CM selected");
     303        mr_msg(2, "CM selected");
    304304        retval += compare_mode(bkpinfo, mountlist, raidlist);
    305305    }
     
    351351    /* try to partition and format */
    352352
    353     log_msg(2, "interactive_mode --- starting (great, assertions OK)");
     353    mr_msg(2, "interactive_mode --- starting (great, assertions OK)");
    354354
    355355    assert(bkpinfo != NULL);
     
    357357    assert(raidlist != NULL);
    358358
    359     log_msg(2, "interactive_mode --- assertions OK");
     359    mr_msg(2, "interactive_mode --- assertions OK");
    360360
    361361    if (g_text_mode) {
     
    378378#endif
    379379    if (strstr(tmp,"noresize")) {
    380         log_msg(1, "Not resizing mountlist.");
     380        mr_msg(1, "Not resizing mountlist.");
    381381    } else {
    382382        resize_mountlist_proportionately_to_suit_new_drives(mountlist);
     
    400400            paranoid_MR_finish(1);
    401401        }
    402         log_msg(2, "Proceeding...");
     402        mr_msg(2, "Proceeding...");
    403403        save_mountlist_to_disk(mountlist, g_mountlist_fname);
    404404        save_raidlist_to_raidtab(raidlist, RAIDTAB_FNAME);
     
    496496                          ("Do you want me to restore all of your data?"))))
    497497    {
    498         log_msg(1, "Restoring all data");
     498        mr_msg(1, "Restoring all data");
    499499        retval += restore_everything(bkpinfo, NULL);
    500500    } else if ((restore_all =
     
    520520                        mr_allocstr(bkpinfo->restore_path, ""); // so we restore to [blank]/file/name :)
    521521                    }
    522                     log_msg(1, "Restoring subset");
     522                    mr_msg(1, "Restoring subset");
    523523                    retval += restore_everything(bkpinfo, filelist);
    524524                    free_filelist(filelist);
     
    626626    assert(raidlist != NULL);
    627627    if (iso_fiddly_bits(bkpinfo, nuke_me_please)) {
    628         log_msg(1, "iso_mode --- returning w/ error");
     628        mr_msg(1, "iso_mode --- returning w/ error");
    629629        return (1);
    630630    } else {
     
    726726    assert(raidlist != NULL);
    727727
    728     log_msg(2, "nuke_mode --- starting");
     728    mr_msg(2, "nuke_mode --- starting");
    729729
    730730    get_cfg_file_from_archive_or_bust(bkpinfo);
     
    736736#endif
    737737    if (strstr(tmp,"noresize")) {
    738         log_msg(2, "Not resizing mountlist.");
     738        mr_msg(2, "Not resizing mountlist.");
    739739    } else {
    740740        resize_mountlist_proportionately_to_suit_new_drives(mountlist);
     
    776776#endif
    777777            if (strstr(tmp,"nopart")) {
    778                 log_msg(2,
     778                mr_msg(2,
    779779                        "Not partitioning drives due to 'nopart' option.");
    780780                res = 0;
     
    829829    retval += restore_everything(bkpinfo, NULL);
    830830    if (!run_boot_loader(FALSE)) {
    831         log_msg(1,
     831        mr_msg(1,
    832832                "Great! Boot loader was installed. No need for msg at end.");
    833833        boot_loader_installed = TRUE;
     
    907907    struct s_node *filelist = NULL;
    908908
    909     log_msg(1, "restore_to_live_filesystem() - starting");
     909    mr_msg(1, "restore_to_live_filesystem() - starting");
    910910    assert(bkpinfo != NULL);
    911911
     
    922922    interactively_obtain_media_parameters_from_user(bkpinfo, FALSE);
    923923    if (bkpinfo->media_device == NULL) {
    924         log_msg(2, "Warning - failed to find media dev");
     924        mr_msg(2, "Warning - failed to find media dev");
    925925    } else {
    926         log_msg(2, "bkpinfo->media_device = %s", bkpinfo->media_device);
    927     }
    928 
    929 
    930     log_msg(2, "bkpinfo->isodir = %s", bkpinfo->isodir);
     926        mr_msg(2, "bkpinfo->media_device = %s", bkpinfo->media_device);
     927    }
     928
     929
     930    mr_msg(2, "bkpinfo->isodir = %s", bkpinfo->isodir);
    931931
    932932    open_evalcall_form(_("Thinking..."));
     
    953953    }
    954954    if (IS_THIS_A_STREAMING_BACKUP(bkpinfo->backup_media_type)) {
    955         log_msg(2,
     955        mr_msg(2,
    956956                "I probably don't need to unmount or eject the CD-ROM but I'm doing it anyway.");
    957957    }
     
    10381038    if (fread((void *) &biggiestruct, 1, sizeof(biggiestruct), fin) <
    10391039        sizeof(biggiestruct)) {
    1040         log_msg(2, "Warning - unable to get biggiestruct of bigfile #%d",
     1040        mr_msg(2, "Warning - unable to get biggiestruct of bigfile #%d",
    10411041                bigfileno + 1);
    10421042    }
     
    10481048        mr_asprintf(&tmp, "Warning - bigfile %ld does not have a checksum",
    10491049                bigfileno + 1);
    1050         log_msg(3, tmp);
     1050        mr_msg(3, tmp);
    10511051        mr_free(tmp);
    10521052        /* BERLIOS : Useless ???
     
    10681068        node = find_string_at_node(filelist, biggiestruct.filename);
    10691069        if (!node) {
    1070             log_msg(0, "Skipping %s (name isn't in filelist)",
     1070            mr_msg(0, "Skipping %s (name isn't in filelist)",
    10711071                    biggiestruct.filename);
    10721072            return (pathname_of_last_file_restored);
    10731073        } else if (!(node->selected)) {
    1074             log_msg(1, "Skipping %s (name isn't in biggielist subset)",
     1074            mr_msg(1, "Skipping %s (name isn't in biggielist subset)",
    10751075                    biggiestruct.filename);
    10761076            return (pathname_of_last_file_restored);
     
    10791079    /* otherwise, continue */
    10801080
    1081     log_msg(1, "DEFINITELY restoring %s", biggiestruct.filename);
     1081    mr_msg(1, "DEFINITELY restoring %s", biggiestruct.filename);
    10821082    if (biggiestruct.use_ntfsprog) {
    10831083        if (strncmp(biggiestruct.filename, "/dev/", 5)) {
    1084             log_msg(1,
     1084            mr_msg(1,
    10851085                    "I was in error when I set biggiestruct.use_ntfsprog to TRUE.");
    1086             log_msg(1, "%s isn't even in /dev", biggiestruct.filename);
     1086            mr_msg(1, "%s isn't even in /dev", biggiestruct.filename);
    10871087            biggiestruct.use_ntfsprog = FALSE;
    10881088        }
     
    10941094        g_loglevel = 4;
    10951095        use_ntfsprog_hack = TRUE;
    1096         log_msg(2,
     1096        mr_msg(2,
    10971097                "Calling ntfsclone in background because %s is an NTFS /dev entry",
    10981098                outfile_fname);
     
    11061106            fatal_error("Fork failure");
    11071107        case 0:
    1108             log_msg(3,
     1108            mr_msg(3,
    11091109                    "CHILD - fip - calling feed_outfrom_ntfsprog(%s, %s)",
    11101110                    biggiestruct.filename, ntfsprog_fifo);
     
    11121112                feed_outfrom_ntfsprog(biggiestruct.filename,
    11131113                                      ntfsprog_fifo);
    1114 //          log_msg(3, "CHILD - fip - exiting");
     1114//          mr_msg(3, "CHILD - fip - exiting");
    11151115            exit(res);
    11161116            break;
    11171117        default:
    1118             log_msg(3,
     1118            mr_msg(3,
    11191119                    "feed_into_ntfsprog() called in background --- pid=%ld",
    11201120                    (long int) (pid));
     
    11331133    mr_asprintf(&tmp, "Reassembling big file %ld (%s)", bigfileno + 1,
    11341134            outfile_fname);
    1135     log_msg(2, tmp);
     1135    mr_msg(2, tmp);
    11361136    mr_free(tmp);
    11371137
     
    11441144    mr_asprintf(&pathname_of_last_file_restored, biggiestruct.filename);
    11451145
    1146     log_msg(3, "file_to_openout = %s", file_to_openout);
     1146    mr_msg(3, "file_to_openout = %s", file_to_openout);
    11471147    if (!(fout = fopen(file_to_openout, "w"))) {
    11481148        log_to_screen(_("Cannot openout outfile_fname - hard disk full?"));
    11491149        return (pathname_of_last_file_restored);
    11501150    }
    1151     log_msg(3, "Opened out to %s", outfile_fname);  // CD/DVD --> mondorestore --> ntfsclone --> hard disk itself
     1151    mr_msg(3, "Opened out to %s", outfile_fname);   // CD/DVD --> mondorestore --> ntfsclone --> hard disk itself
    11521152
    11531153    for (sliceno = 1, finished = FALSE; !finished;) {
     
    11601160            !does_file_exist(tmp1) &&
    11611161            !does_file_exist(tmp2)) {
    1162             log_msg(3,
     1162            mr_msg(3,
    11631163                    "Cannot find a data slice or terminator slice on CD %d",
    11641164                    g_current_media_number);
     
    11681168                    bkpinfo->backup_media_string,
    11691169                    g_current_media_number, sliceno);
    1170             log_msg(2, tmp3);
     1170            mr_msg(2, tmp3);
    11711171            mr_free(tmp3);
    11721172
     
    11811181        } else {
    11821182            if (does_file_exist(tmp) && length_of_file(tmp) == 0) {
    1183                 log_msg(2,
     1183                mr_msg(2,
    11841184                        "End of bigfile # %ld (slice %ld is the terminator)",
    11851185                        bigfileno + 1, sliceno);
     
    12071207                    bkpinfo->backup_media_string,
    12081208                    g_current_media_number, bigfileno + 1, sliceno);
    1209             log_msg(2, tmp3);
     1209            mr_msg(2, tmp3);
    12101210            if (!g_text_mode) {
    12111211                newtDrawRootText(0, g_noof_rows - 2, tmp3);
     
    12431243
    12441244    if (use_ntfsprog_hack) {
    1245         log_msg(3, "Waiting for ntfsclone to finish");
     1245        mr_msg(3, "Waiting for ntfsclone to finish");
    12461246        mr_asprintf(&tmp,
    12471247                " ps | grep \" ntfsclone \" | grep -v grep > /dev/null 2> /dev/null");
     
    13211321    if (use_ntfsprog == BLK_START_A_PIHBIGGIE) {
    13221322        use_ntfsprog = 1;
    1323         log_msg(1, "%s --- pih=YES", orig_bf_fname);
     1323        mr_msg(1, "%s --- pih=YES", orig_bf_fname);
    13241324    } else if (use_ntfsprog == BLK_START_A_NORMBIGGIE) {
    13251325        use_ntfsprog = 0;
    1326         log_msg(1, "%s --- pih=NO", orig_bf_fname);
     1326        mr_msg(1, "%s --- pih=NO", orig_bf_fname);
    13271327    } else {
    13281328        use_ntfsprog = 0;
    1329         log_msg(1, "%s --- pih=NO (weird marker though)", orig_bf_fname);
     1329        mr_msg(1, "%s --- pih=NO (weird marker though)", orig_bf_fname);
    13301330    }
    13311331
     
    13381338        if (!node) {
    13391339            dummy_restore = TRUE;
    1340             log_msg(1,
     1340            mr_msg(1,
    13411341                    "Skipping big file %ld (%s) - not in biggielist subset",
    13421342                    biggiefile_number + 1, orig_bf_fname);
     
    13441344        } else if (!(node->selected)) {
    13451345            dummy_restore = TRUE;
    1346             log_msg(1, "Skipping %s (name isn't in biggielist subset)",
     1346            mr_msg(1, "Skipping %s (name isn't in biggielist subset)",
    13471347                    orig_bf_fname);
    13481348            pathname_of_last_file_restored = NULL;
     
    13521352    if (use_ntfsprog) {
    13531353        if (strncmp(orig_bf_fname, "/dev/", 5)) {
    1354             log_msg(1, "I was in error when I set use_ntfsprog to TRUE.");
    1355             log_msg(1, "%s isn't even in /dev", orig_bf_fname);
     1354            mr_msg(1, "I was in error when I set use_ntfsprog to TRUE.");
     1355            mr_msg(1, "%s isn't even in /dev", orig_bf_fname);
    13561356            use_ntfsprog = FALSE;
    13571357        }
     
    13621362        mr_asprintf(&outfile_fname, orig_bf_fname);
    13631363        use_ntfsprog_hack = TRUE;
    1364         log_msg(2,
     1364        mr_msg(2,
    13651365                "Calling ntfsclone in background because %s is a /dev entry",
    13661366                outfile_fname);
     
    13761376            fatal_error("Fork failure");
    13771377        case 0:
    1378             log_msg(3,
     1378            mr_msg(3,
    13791379                    "CHILD - fip - calling feed_outfrom_ntfsprog(%s, %s)",
    13801380                    outfile_fname, ntfsprog_fifo);
    13811381            res = feed_outfrom_ntfsprog(outfile_fname, ntfsprog_fifo);
    1382 //          log_msg(3, "CHILD - fip - exiting");
     1382//          mr_msg(3, "CHILD - fip - exiting");
    13831383            exit(res);
    13841384            break;
    13851385        default:
    1386             log_msg(3,
     1386            mr_msg(3,
    13871387                    "feed_into_ntfsprog() called in background --- pid=%ld",
    13881388                    (long int) (pid));
     
    14061406        mr_asprintf(&tmp1, "Reassembling big file %ld (%s)",
    14071407                biggiefile_number + 1, orig_bf_fname);
    1408         log_msg(2, tmp1);
     1408        mr_msg(2, tmp1);
    14091409        mr_free(tmp1);
    14101410    }
     
    14221422    }
    14231423    mr_asprintf(&tmp1, "Pipe command = '%s'", command);
    1424     log_msg(3, tmp1);
     1424    mr_msg(3, tmp1);
    14251425    mr_free(tmp1);
    14261426
     
    14391439        mr_asprintf(&tmp1, "Working on file #%ld, slice #%ld    ",
    14401440                biggiefile_number + 1, current_slice_number);
    1441         log_msg(2, tmp1);
     1441        mr_msg(2, tmp1);
    14421442
    14431443        if (!g_text_mode) {
     
    14601460                    ((void *) &biggiestruct, 1, sizeof(biggiestruct),
    14611461                     fin) < sizeof(biggiestruct)) {
    1462                     log_msg(2,
     1462                    mr_msg(2,
    14631463                            "Warning - unable to get biggiestruct of bigfile #%d",
    14641464                            biggiefile_number + 1);
     
    14811481    paranoid_pclose(pout);
    14821482
    1483     log_msg(1, "pathname_of_last_file_restored is now %s",
     1483    mr_msg(1, "pathname_of_last_file_restored is now %s",
    14841484            pathname_of_last_file_restored);
    14851485
    14861486    if (use_ntfsprog_hack) {
    1487         log_msg(3, "Waiting for ntfsclone to finish");
     1487        mr_msg(3, "Waiting for ntfsclone to finish");
    14881488        mr_asprintf(&tmp,
    14891489                " ps | grep \" ntfsclone \" | grep -v grep > /dev/null 2> /dev/null");
     
    14921492        }   
    14931493        mr_free(tmp);
    1494         log_msg(3, "OK, ntfsclone has really finished");
    1495     }
    1496 
    1497     log_msg(3, "biggiestruct.filename = %s", biggiestruct.filename);
    1498     log_msg(3, "biggiestruct.checksum = %s", biggiestruct.checksum);
     1494        mr_msg(3, "OK, ntfsclone has really finished");
     1495    }
     1496
     1497    mr_msg(3, "biggiestruct.filename = %s", biggiestruct.filename);
     1498    mr_msg(3, "biggiestruct.checksum = %s", biggiestruct.checksum);
    14991499    if (strcmp(outfile_fname, "/dev/null")) {
    15001500        chmod(outfile_fname, biggiestruct.properties.st_mode);
     
    15501550    assert_string_is_neither_NULL_nor_zerolength(tarball_fname);
    15511551
    1552     log_msg(5, "Entering");
     1552    mr_msg(5, "Entering");
    15531553    use_star = (strstr(tarball_fname, ".star")) ? TRUE : FALSE;
    15541554    mr_asprintf(&command, "mkdir -p %s/tmp", MNT_RESTORING);
     
    15591559            current_tarball_number);
    15601560    if (length_of_file(filelist_name) <= 2) {
    1561         log_msg(2, "There are _zero_ files in filelist '%s'",
     1561        mr_msg(2, "There are _zero_ files in filelist '%s'",
    15621562                filelist_name);
    1563         log_msg(2,
     1563        mr_msg(2,
    15641564                "This is a bit silly (ask dev-team to fix mondo_makefilelist, please)");
    1565         log_msg(2,
     1565        mr_msg(2,
    15661566                "but it's non-critical. It's cosmetic. Don't worry about it.");
    15671567        retval = 0;
    1568         log_msg(5, "Leaving");
     1568        mr_msg(5, "Leaving");
    15691569        return (retval);
    15701570    }
    15711571    if (count_lines_in_file(filelist_name) <= 0
    15721572        || length_of_file(tarball_fname) <= 0) {
    1573         log_msg(3, "length_of_file(%s) = %llu", tarball_fname,
     1573        mr_msg(3, "length_of_file(%s) = %llu", tarball_fname,
    15741574                length_of_file(tarball_fname));
    15751575        mr_asprintf(&tmp, "Unable to restore fileset #%ld (CD I/O error)",
     
    15781578        mr_free(tmp);
    15791579        retval = 1;
    1580         log_msg(5, "Leaving");
     1580        mr_msg(5, "Leaving");
    15811581        return (retval);
    15821582    }
     
    15911591            <= 0) {
    15921592            mr_asprintf(&tmp, "Skipping fileset %ld", current_tarball_number);
    1593             log_msg(1, tmp);
     1593            mr_msg(1, tmp);
    15941594            mr_free(tmp);
    15951595        } else {
    1596             log_msg(3, "Saved fileset %ld's subset to %s",
     1596            mr_msg(3, "Saved fileset %ld's subset to %s",
    15971597                    current_tarball_number, filelist_subset_fname);
    15981598        }
     
    16781678
    16791679#undef BUFSIZE
    1680         log_msg(1, "command = '%s'", command);
     1680        mr_msg(1, "command = '%s'", command);
    16811681        unlink(temp_log);
    16821682        res = system(command);
     
    16851685            if (p) {
    16861686                p[0] = p[1] = p[2] = p[3] = ' ';
    1687                 log_msg(1, "new command = '%s'", command);
     1687                mr_msg(1, "new command = '%s'", command);
    16881688                res = system(command);
    16891689            }
     
    16961696
    16971697        if (g_getfattr) {
    1698             log_msg(1, "Setting fattr list %s", xattr_fname);
     1698            mr_msg(1, "Setting fattr list %s", xattr_fname);
    16991699            if (length_of_file(xattr_fname) > 0) {
    17001700                res = set_fattr_list(filelist_subset_fname, xattr_fname);
     
    17031703                        ("Errors occurred while setting extended attributes");
    17041704                } else {
    1705                     log_msg(1, "I set xattr OK");
     1705                    mr_msg(1, "I set xattr OK");
    17061706                }
    17071707                retval += res;
     
    17091709        }
    17101710        if (g_getfacl) {
    1711             log_msg(1, "Setting acl list %s", acl_fname);
     1711            mr_msg(1, "Setting acl list %s", acl_fname);
    17121712            if (length_of_file(acl_fname) > 0) {
    17131713                res = set_acl_list(filelist_subset_fname, acl_fname);
     
    17161716                        ("Errors occurred while setting access control lists");
    17171717                } else {
    1718                     log_msg(1, "I set ACL OK");
     1718                    mr_msg(1, "I set ACL OK");
    17191719                }
    17201720                retval += res;
     
    17251725            system(command);
    17261726            mr_free(command);
    1727             log_msg(2, "Errors occurred while processing fileset #%d",
     1727            mr_msg(2, "Errors occurred while processing fileset #%d",
    17281728                    current_tarball_number);
    17291729        } else {
    1730             log_msg(2, "Fileset #%d processed OK", current_tarball_number);
     1730            mr_msg(2, "Fileset #%d processed OK", current_tarball_number);
    17311731        }
    17321732        unlink(xattr_fname);
     
    17451745    mr_free(acl_fname);
    17461746    mr_free(temp_log);
    1747     log_msg(5, "Leaving");
     1747    mr_msg(5, "Leaving");
    17481748    return (retval);
    17491749}
     
    18001800            bkpinfo->backup_media_string,
    18011801            g_current_media_number);
    1802     log_msg(2, tmp);
     1802    mr_msg(2, tmp);
    18031803    mr_free(tmp);
    18041804    run_program_and_log_output("mkdir -p " MNT_RESTORING "/tmp", FALSE);
     
    18201820    }
    18211821    if (res) {
    1822         log_msg(1, "Warning - error reading afioball from tape");
     1822        mr_msg(1, "Warning - error reading afioball from tape");
    18231823    }
    18241824    if (bkpinfo->compression_level != 0) {
     
    18431843                    executable, afio_fname, filelist_fname, MONDO_LOGFILE);
    18441844        }
    1845         log_msg(1, "command = %s", command);
     1845        mr_msg(1, "command = %s", command);
    18461846        if (system(command)) {
    1847             log_msg(4, "Warning - error occurred while retrieving TOC");
     1847            mr_msg(4, "Warning - error occurred while retrieving TOC");
    18481848        }
    18491849        mr_free(command);
     
    18541854            <= 0 || length_of_file(filelist_subset_fname) < 2) {
    18551855            if (length_of_file(filelist_subset_fname) < 2) {
    1856                 log_msg(1, "No matches found in fileset %ld",
     1856                mr_msg(1, "No matches found in fileset %ld",
    18571857                        current_tarball_number);
    18581858            }
    18591859            mr_asprintf(&tmp, "Skipping fileset %ld", current_tarball_number);
    1860             log_msg(2, tmp);
     1860            mr_msg(2, tmp);
    18611861            mr_free(tmp);
    18621862            restore_this_fileset = FALSE;
    18631863        } else {
    1864             log_msg(5, "%ld matches. Saved fileset %ld's subset to %s",
     1864            mr_msg(5, "%ld matches. Saved fileset %ld's subset to %s",
    18651865                    matches, current_tarball_number,
    18661866                    filelist_subset_fname);
     
    18921892    // Call if IF there are files to restore (selectively/unconditionally)
    18931893    if (restore_this_fileset) {
    1894         log_msg(1, "Calling command='%s'", command);
     1894        mr_msg(1, "Calling command='%s'", command);
    18951895        paranoid_system(command);
    18961896
     
    18991899            res = set_fattr_list(filelist_subset_fname, xattr_fname);
    19001900            if (res) {
    1901                 log_msg(1, "Errors occurred while setting xattr");
     1901                mr_msg(1, "Errors occurred while setting xattr");
    19021902            } else {
    1903                 log_msg(1, "I set xattr OK");
     1903                mr_msg(1, "I set xattr OK");
    19041904            }
    19051905            retval += res;
     
    19101910            res = set_acl_list(filelist_subset_fname, acl_fname);
    19111911            if (res) {
    1912                 log_msg(1, "Errors occurred while setting ACL");
     1912                mr_msg(1, "Errors occurred while setting ACL");
    19131913            } else {
    1914                 log_msg(1, "I set ACL OK");
     1914                mr_msg(1, "I set ACL OK");
    19151915            }
    19161916            retval += res;
     
    19181918
    19191919    } else {
    1920         log_msg(1, "NOT CALLING '%s'", command);
     1920        mr_msg(1, "NOT CALLING '%s'", command);
    19211921    }
    19221922    mr_free(command);
     
    19701970            "%s/biggies-whose-EXATs-we-should-set", bkpinfo->tmpdir);
    19711971    if (!(fbw = fopen(biggies_whose_EXATs_we_should_set, "w"))) {
    1972         log_msg(1, "Warning - cannot openout %s",
     1972        mr_msg(1, "Warning - cannot openout %s",
    19731973                biggies_whose_EXATs_we_should_set);
    19741974    }
     
    19831983
    19841984    if (length_of_file(BIGGIELIST) < 6) {
    1985         log_msg(1, "OK, no biggielist; not restoring biggiefiles");
     1985        mr_msg(1, "OK, no biggielist; not restoring biggiefiles");
    19861986        return (0);
    19871987    }
    19881988    noof_biggiefiles = count_lines_in_file(BIGGIELIST);
    19891989    if (noof_biggiefiles <= 0) {
    1990         log_msg(2,
     1990        mr_msg(2,
    19911991                "OK, no biggiefiles in biggielist; not restoring biggiefiles");
    19921992        return (0);
     
    19941994    mr_asprintf(&tmp, "OK, there are %ld biggiefiles in the archives",
    19951995            noof_biggiefiles);
    1996     log_msg(2, tmp);
     1996    mr_msg(2, tmp);
    19971997    mr_free(tmp);
    19981998
     
    20022002                       "", total_slices);
    20032003    for (bigfileno = 0, finished = FALSE; !finished;) {
    2004         log_msg(2, "Thinking about restoring bigfile %ld", bigfileno + 1);
     2004        mr_msg(2, "Thinking about restoring bigfile %ld", bigfileno + 1);
    20052005        tmp = slice_fname(bigfileno, 0, ARCHIVES_PATH, "");
    20062006        if (!does_file_exist(tmp)) {
    2007             log_msg(3,
     2007            mr_msg(3,
    20082008                    "...but its first slice isn't on this CD. Perhaps this was a selective restore?");
    2009             log_msg(3, "Cannot find bigfile #%ld 's first slice on %s #%d",
     2009            mr_msg(3, "Cannot find bigfile #%ld 's first slice on %s #%d",
    20102010                    bigfileno + 1,
    20112011                    bkpinfo->backup_media_string,
    20122012                    g_current_media_number);
    20132013            tmp1 = slice_fname(bigfileno + 1, 0, ARCHIVES_PATH, "");
    2014             log_msg(3, "Slicename would have been %s", tmp1);
     2014            mr_msg(3, "Slicename would have been %s", tmp1);
    20152015            mr_free(tmp1);
    20162016
     
    20182018            if (just_changed_cds) {
    20192019                just_changed_cds = FALSE;
    2020                 log_msg(3,
     2020                mr_msg(3,
    20212021                        "I'll continue to scan this CD for bigfiles to be restored.");
    20222022            } else if (does_file_exist(MNT_CDROM "/archives/NOT-THE-LAST")) {
     
    20312031                just_changed_cds = TRUE;
    20322032            } else {
    2033                 log_msg(2, "There was no bigfile #%ld. That's OK.",
     2033                mr_msg(2, "There was no bigfile #%ld. That's OK.",
    20342034                        bigfileno + 1);
    2035                 log_msg(2, "I'm going to stop restoring bigfiles now.");
     2035                mr_msg(2, "I'm going to stop restoring bigfiles now.");
    20362036                finished = TRUE;
    20372037            }
     
    21222122
    21232123    mvaddstr_and_log_it(g_currentY, 0, _("Restoring from archives"));
    2124     log_msg(2,
     2124    mr_msg(2,
    21252125            "Insisting on 1st CD, so that I can have a look at LAST-FILELIST-NUMBER");
    21262126    if (g_current_media_number != 1) {
    2127         log_msg(3, "OK, that's jacked up.");
     2127        mr_msg(3, "OK, that's jacked up.");
    21282128        g_current_media_number = 1;
    21292129    }
     
    21992199                    bkpinfo->backup_media_string,
    22002200                    g_current_media_number);
    2201 //    log_msg(3, "progress_str = %s", progress_str);
     2201//    mr_msg(3, "progress_str = %s", progress_str);
    22022202            for (res = 999, attempts = 0; attempts < 3 && res != 0;
    22032203                 attempts++) {
     
    22992299            "%s/biggies-whose-EXATs-we-should-set", bkpinfo->tmpdir);
    23002300    if (!(fbw = fopen(biggies_whose_EXATs_we_should_set, "w"))) {
    2301         log_msg(1, "Warning - cannot openout %s",
     2301        mr_msg(1, "Warning - cannot openout %s",
    23022302                biggies_whose_EXATs_we_should_set);
    23032303    }
     
    23152315    mr_asprintf(&tmp, "OK, there are %ld biggiefiles in the archives",
    23162316            noof_biggiefiles);
    2317     log_msg(2, tmp);
     2317    mr_msg(2, tmp);
    23182318    mr_free(tmp);
    23192319
     
    23502350                                               current_bigfile_number,
    23512351                                               filelist, ctrl_chr);
    2352         log_msg(1, "I believe I have restored %s",
     2352        mr_msg(1, "I believe I have restored %s",
    23532353                pathname_of_last_biggie_restored);
    23542354        if (fbw && pathname_of_last_biggie_restored[0]) {
     
    23702370                noof_biggiefiles, current_bigfile_number);
    23712371    }
    2372     log_msg(1, tmp);
     2372    mr_msg(1, tmp);
    23732373    mr_free(tmp);
    23742374
     
    23792379            if (g_getfattr) {
    23802380                if (length_of_file(xattr_fname) > 0) {
    2381                     log_msg(1, "set_fattr_List(%s,%s)",
     2381                    mr_msg(1, "set_fattr_List(%s,%s)",
    23822382                        biggies_whose_EXATs_we_should_set, xattr_fname);
    23832383                    set_fattr_list(biggies_whose_EXATs_we_should_set,
     
    23872387            if (g_getfacl) {
    23882388                if (length_of_file(acl_fname) > 0) {
    2389                     log_msg(1, "set_acl_list(%s,%s)",
     2389                    mr_msg(1, "set_acl_list(%s,%s)",
    23902390                            biggies_whose_EXATs_we_should_set, acl_fname);
    23912391                    set_acl_list(biggies_whose_EXATs_we_should_set, acl_fname);
     
    24692469                       progress_str, max_val);
    24702470
    2471     log_msg(3, "hey");
     2471    mr_msg(3, "hey");
    24722472
    24732473    res = read_header_block_from_stream(&tmp_size, tmp_fname, &ctrl_chr);
    24742474    if (res) {
    2475         log_msg(2, "Warning - error reading afioball from tape");
     2475        mr_msg(2, "Warning - error reading afioball from tape");
    24762476    }
    24772477    retval += res;
     
    24792479        wrong_marker(BLK_START_AFIOBALLS, ctrl_chr);
    24802480    }
    2481     log_msg(2, "ho");
     2481    mr_msg(2, "ho");
    24822482    res = read_header_block_from_stream(&tmp_size, tmp_fname, &ctrl_chr);
    24832483    while (ctrl_chr != BLK_STOP_AFIOBALLS) {
     
    25482548    mr_free(tmp_fname);
    25492549
    2550     log_msg(1, "All done with afioballs");
     2550    mr_msg(1, "All done with afioballs");
    25512551    close_progress_form();
    25522552    if (retval) {
     
    25862586    malloc_string(cwd);
    25872587    malloc_string(newpath);
    2588     log_msg(2, "restore_everything() --- starting");
     2588    mr_msg(2, "restore_everything() --- starting");
    25892589    g_current_media_number = 1;
    25902590    /* BERLIOS: should test return value, or better change the function */
     
    25942594    mr_free(tmp);
    25952595
    2596     log_msg(1, "Changing dir to %s", bkpinfo->restore_path);
     2596    mr_msg(1, "Changing dir to %s", bkpinfo->restore_path);
    25972597    chdir(bkpinfo->restore_path);
    25982598    /* BERLIOS: should test return value, or better change the function */
    25992599    getcwd(newpath, MAX_STR_LEN - 1);
    2600     log_msg(1, "path is now %s", newpath);
    2601     log_msg(1, "restoring everything");
     2600    mr_msg(1, "path is now %s", newpath);
     2601    mr_msg(1, "restoring everything");
    26022602    tmp = find_home_of_exe("petris");
    26032603    if (!tmp && !g_text_mode) {
     
    26422642    }
    26432643    if (length_of_file("/etc/raidtab") > 0) {
    2644         log_msg(2, "Copying local raidtab to restored filesystem");
     2644        mr_msg(2, "Copying local raidtab to restored filesystem");
    26452645        run_program_and_log_output("cp -f /etc/raidtab " MNT_RESTORING
    26462646                                   "/etc/raidtab", FALSE);
    26472647    }
    26482648    kill_petris();
    2649     log_msg(2, "restore_everything() --- leaving");
     2649    mr_msg(2, "restore_everything() --- leaving");
    26502650    mr_free(cwd);
    26512651    mr_free(newpath);
     
    26902690    sprintf(tmp, "restore_here = '%s'", restore_here);
    26912691
    2692     log_msg(2, tmp);
    2693 
    2694     log_msg(2, "restore_live_from_monitas_server() - starting");
     2692    mr_msg(2, tmp);
     2693
     2694    mr_msg(2, "restore_live_from_monitas_server() - starting");
    26952695    unlink("/tmp/mountlist.txt");
    26962696    unlink("/tmp/filelist.full");
     
    27012701        strcpy(bkpinfo->restore_path, restore_here);
    27022702    }
    2703     log_msg(3, "FYI FYI FYI FYI FYI FYI FYI FYI FYI FYI FYI");
     2703    mr_msg(3, "FYI FYI FYI FYI FYI FYI FYI FYI FYI FYI FYI");
    27042704    sprintf(tmp, "FYI - data will be restored to %s",
    27052705            bkpinfo->restore_path);
    2706     log_msg(3, tmp);
    2707     log_msg(3, "FYI FYI FYI FYI FYI FYI FYI FYI FYI FYI FYI");
     2706    mr_msg(3, tmp);
     2707    mr_msg(3, "FYI FYI FYI FYI FYI FYI FYI FYI FYI FYI FYI");
    27082708    sprintf(datadisks_fname, "/tmp/mondorestore.datadisks.%d",
    27092709            (int) (random() % 32768));
     
    27562756            restore_this_directory, g_biggielist_txt, g_biggielist_txt);
    27572757    if (system(command)) {
    2758         log_msg(1,
     2758        mr_msg(1,
    27592759                "Error(s) occurred while processing biggielist and wildcard");
    27602760    }
     
    27642764    retval += restore_everything(bkpinfo, filelist);
    27652765    free_filelist(filelist);
    2766     log_msg(2, "--------End of restore_live_from_monitas_server--------");
     2766    mr_msg(2, "--------End of restore_live_from_monitas_server--------");
    27672767    return (retval);
    27682768}
     
    27852785void welcome_to_mondorestore()
    27862786{
    2787     log_msg(0, "-------------- Mondo Restore v%s -------------",
     2787    mr_msg(0, "-------------- Mondo Restore v%s -------------",
    27882788            PACKAGE_VERSION);
    2789     log_msg(0,
     2789    mr_msg(0,
    27902790            "DON'T PANIC! Mondorestore logs almost everything, so please ");
    2791     log_msg(0,
     2791    mr_msg(0,
    27922792            "don't break out in a cold sweat just because you see a few  ");
    2793     log_msg(0,
     2793    mr_msg(0,
    27942794            "error messages in the log. Read them; analyze them; see if  ");
    2795     log_msg(0,
     2795    mr_msg(0,
    27962796            "they are significant; above all, verify your backups! Please");
    2797     log_msg(0,
     2797    mr_msg(0,
    27982798            "attach a compressed copy of this log to any e-mail you send ");
    2799     log_msg(0,
     2799    mr_msg(0,
    28002800            "to the Mondo mailing list when you are seeking technical    ");
    2801     log_msg(0,
     2801    mr_msg(0,
    28022802            "support. Without it, we can't help you.            - DevTeam");
    2803     log_msg(0,
     2803    mr_msg(0,
    28042804            "------------------------------------------------------------");
    2805     log_msg(0,
     2805    mr_msg(0,
    28062806            "BTW, despite (or perhaps because of) the wealth of messages,");
    2807     log_msg(0,
     2807    mr_msg(0,
    28082808            "some users are inclined to stop reading this log.  If Mondo ");
    2809     log_msg(0,
     2809    mr_msg(0,
    28102810            "stopped for some reason, chances are it's detailed here.    ");
    2811     log_msg(0,
     2811    mr_msg(0,
    28122812            "More than likely there's a message near the end of this     ");
    2813     log_msg(0,
     2813    mr_msg(0,
    28142814            "log that will tell you what is wrong.  Please read it!      ");
    2815     log_msg(0,
     2815    mr_msg(0,
    28162816            "------------------------------------------------------------");
    28172817}
     
    28632863    if (strstr(tmp,"textonly")) {
    28642864        g_text_mode = TRUE;
    2865         log_msg(1, "TEXTONLY MODE");
     2865        mr_msg(1, "TEXTONLY MODE");
    28662866    } else {
    28672867        g_text_mode = FALSE;
     
    28962896    g_kernel_version = get_kernel_version();
    28972897
    2898     log_msg(1, "FYI - g_mountlist_fname = %s", g_mountlist_fname);
     2898    mr_msg(1, "FYI - g_mountlist_fname = %s", g_mountlist_fname);
    28992899    mkdir(MNT_CDROM, 0x770);
    29002900
     
    29022902    mr_asprintf(&tmp, "%s.orig", g_mountlist_fname);
    29032903    if (!does_file_exist(g_mountlist_fname)) {
    2904         log_msg(2,
     2904        mr_msg(2,
    29052905                "%ld: Warning - g_mountlist_fname (%s) does not exist yet",
    29062906                __LINE__, g_mountlist_fname);
     
    29322932    welcome_to_mondorestore();
    29332933    if (bkpinfo->disaster_recovery) {
    2934         log_msg(1, "I am in disaster recovery mode");
     2934        mr_msg(1, "I am in disaster recovery mode");
    29352935    } else {
    2936         log_msg(1, "I am in normal, live mode");
     2936        mr_msg(1, "I am in normal, live mode");
    29372937    }
    29382938
     
    30193019
    30203020    if (argc == 5 && strcmp(argv[1], "--copy") == 0) {
    3021         log_msg(1, "SCORE");
     3021        mr_msg(1, "SCORE");
    30223022        g_loglevel = 10;
    30233023        if (strstr(argv[2], "save")) {
    3024             log_msg(1, "Saving from %s to %s", argv[3], argv[4]);
     3024            mr_msg(1, "Saving from %s to %s", argv[3], argv[4]);
    30253025            fin = fopen(argv[3], "r");
    30263026            fout = fopen(argv[4], "w");
     
    30753075//    return(1);
    30763076        }
    3077         log_msg(1, "I am in normal, live mode.");
    3078         log_msg(2, "FYI, MOUNTLIST_FNAME = %s", g_mountlist_fname);
     3077        mr_msg(1, "I am in normal, live mode.");
     3078        mr_msg(2, "FYI, MOUNTLIST_FNAME = %s", g_mountlist_fname);
    30793079        mount_boot_if_necessary();  /* for Gentoo users */
    3080         log_msg(2, "Still here.");
     3080        mr_msg(2, "Still here.");
    30813081        if (argc > 1 && strcmp(argv[argc - 1], "--live-from-cd") == 0) {
    30823082            g_restoring_live_from_cd = TRUE;
    30833083        } else {
    3084             log_msg(2, "Calling restore_to_live_filesystem()");
     3084            mr_msg(2, "Calling restore_to_live_filesystem()");
    30853085            retval = restore_to_live_filesystem(bkpinfo);
    30863086        }
    3087         log_msg(2, "Still here. Yay.");
     3087        mr_msg(2, "Still here. Yay.");
    30883088        if (strlen(bkpinfo->tmpdir) > 0) {
    30893089            mr_asprintf(&tmp, "rm -Rf %s/*", bkpinfo->tmpdir);
     
    30953095    } else {
    30963096        /* Disaster recovery mode (must be) */
    3097         log_msg(1, "I must be in disaster recovery mode.");
    3098         log_msg(2, "FYI, MOUNTLIST_FNAME = %s ", g_mountlist_fname);
     3097        mr_msg(1, "I must be in disaster recovery mode.");
     3098        mr_msg(2, "FYI, MOUNTLIST_FNAME = %s ", g_mountlist_fname);
    30993099        if (argc == 3 && strcmp(argv[1], "--monitas-memorex") == 0) {
    31003100            log_to_screen(_("Uh, that hasn't been implemented yet."));
     
    31153115            if (bkpinfo->backup_media_type == nfs
    31163116                && !is_this_device_mounted(bkpinfo->nfs_mount)) {
    3117                 log_msg(1, "Mounting nfs dir");
     3117                mr_msg(1, "Mounting nfs dir");
    31183118                mr_allocstr(bkpinfo->isodir, "/tmp/isodir");
    31193119                run_program_and_log_output("mkdir -p /tmp/isodir", 5);
     
    31333133
    31343134
    3135         log_msg(1, "Send in the clowns.");
     3135        mr_msg(1, "Send in the clowns.");
    31363136
    31373137        if (argc == 2 && strcmp(argv[1], "--partition-only") == 0) {
    3138             log_msg(0, "Partitioning only.");
     3138            mr_msg(0, "Partitioning only.");
    31393139            load_raidtab_into_raidlist(raidlist, RAIDTAB_FNAME);
    31403140            mr_allocstr(g_mountlist_fname, "/tmp/mountlist.txt");
     
    31453145
    31463146        if (argc == 2 && strcmp(argv[1], "--format-only") == 0) {
    3147             log_msg(0, "Formatting only.");
     3147            mr_msg(0, "Formatting only.");
    31483148            load_raidtab_into_raidlist(raidlist, RAIDTAB_FNAME);
    31493149            mr_allocstr(g_mountlist_fname, "/tmp/mountlist.txt");
     
    31543154
    31553155        if (argc == 2 && strcmp(argv[1], "--stop-lvm-and-raid") == 0) {
    3156             log_msg(0, "Stopping LVM and RAID");
     3156            mr_msg(0, "Stopping LVM and RAID");
    31573157            load_raidtab_into_raidlist(raidlist, RAIDTAB_FNAME);
    31583158            mr_allocstr(g_mountlist_fname, "/tmp/mountlist.txt");
     
    32413241// g_I_have_just_nuked is set true by nuke_mode() just before it returns
    32423242    if (!system("which post-nuke > /dev/null 2> /dev/null")) {
    3243       log_msg(1, "post-nuke found; find out whether we should run it...");
     3243      mr_msg(1, "post-nuke found; find out whether we should run it...");
    32443244      if (g_I_have_just_nuked || does_file_exist("/POST-NUKE-ANYWAY")) {
    32453245        run_postnuke = TRUE;
    3246         log_msg(1, "Yes, will run post-nuke because in nuke mode or file /POST-NUKE-ANYWAY exists.");
     3246        mr_msg(1, "Yes, will run post-nuke because in nuke mode or file /POST-NUKE-ANYWAY exists.");
    32473247      } else if (ask_me_yes_or_no("post-nuke script found. Do you want to run it?")) {
    32483248        run_postnuke = TRUE;
    3249         log_msg(1, "Yes, will run post-nuke because user interactively asked for it.");
     3249        mr_msg(1, "Yes, will run post-nuke because user interactively asked for it.");
    32503250      } else {
    32513251        run_postnuke = FALSE;
    3252         log_msg(1, "No, will not run post-nuke.");
     3252        mr_msg(1, "No, will not run post-nuke.");
    32533253      }
    32543254    } else {
    3255       log_msg(1, "No post-nuke found.");
     3255      mr_msg(1, "No post-nuke found.");
    32563256    }
    32573257    if (run_postnuke) {
     
    32613261          ("Unable to re-mount partitions for post-nuke stuff");
    32623262      } else {
    3263         log_msg(1, "Re-mounted partitions for post-nuke stuff");
     3263        mr_msg(1, "Re-mounted partitions for post-nuke stuff");
    32643264        sprintf(tmp, "post-nuke %s %d", bkpinfo->restore_path,
    32653265            retval);
    3266         log_msg(2, "Calling '%s'", tmp);
     3266        mr_msg(2, "Calling '%s'", tmp);
    32673267        if ((res = run_program_and_log_output(tmp, 0))) {
    32683268          log_OS_error(tmp);
    32693269        }
    3270         log_msg(1, "post-nuke returned w/ res=%d", res);
     3270        mr_msg(1, "post-nuke returned w/ res=%d", res);
    32713271      }
    32723272      unmount_all_devices(mountlist);
  • trunk/mondo/src/mondorestore/mondo-rstr-compare.c

    r1081 r1086  
    5757            insist_on_this_cd_number(bkpinfo, (++g_current_media_number));
    5858        } else {
    59             log_msg(2, "No CD's left. No biggiefiles left. No problem.");
     59            mr_msg(2, "No CD's left. No biggiefiles left. No problem.");
    6060            return (0);
    6161        }
     
    7777    mr_asprintf(&bigfile_fname, biggiestruct.filename);
    7878
    79     log_msg(2, "biggiestruct.filename = %s", bigfile_fname);
    80     log_msg(2, "biggiestruct.checksum = %s", checksum);
     79    mr_msg(2, "biggiestruct.filename = %s", bigfile_fname);
     80    mr_msg(2, "biggiestruct.checksum = %s", checksum);
    8181
    8282    if (!g_text_mode) {
     
    8888    /* BERLIOS: Useless ?
    8989    if (!checksum[0]) {
    90         log_msg(2, "Warning - %s has no checksum", bigfile_fname_ptr);
     90        mr_msg(2, "Warning - %s has no checksum", bigfile_fname_ptr);
    9191    } */
    9292    if (!strncmp(bigfile_fname, "/dev/", 5)) {
    93         log_msg(2, _("Ignoring device %s"), bigfile_fname);
     93        mr_msg(2, _("Ignoring device %s"), bigfile_fname);
    9494        return(0);
    9595    } else {
     
    9898                MNT_RESTORING, bigfile_fname);
    9999    }
    100     log_msg(2, command);
     100    mr_msg(2, command);
    101101    paranoid_system("cat /tmp/errors >> /tmp/mondo-restore.log 2> /dev/null");
    102102    if (system(command)) {
     
    108108        mr_free(command);
    109109        if (!(fin = fopen("/tmp/md5sum.txt", "r"))) {
    110             log_msg(2, "Unable to open /tmp/md5sum.txt; can't get live checksum");
     110            mr_msg(2, "Unable to open /tmp/md5sum.txt; can't get live checksum");
    111111            mr_free(bigfile_fname);
    112112            return (1);
     
    124124    }
    125125    if (!strcmp(checksum, original_cksum) != 0) {
    126         log_msg(1, "bigfile #%ld ('%s') ... OK", bigfileno + 1, bigfile_fname);
    127     } else {
    128         log_msg(1, "bigfile #%ld ('%s') ... changed", bigfileno + 1, bigfile_fname);
     126        mr_msg(1, "bigfile #%ld ('%s') ... OK", bigfileno + 1, bigfile_fname);
     127    } else {
     128        mr_msg(1, "bigfile #%ld ('%s') ... changed", bigfileno + 1, bigfile_fname);
    129129        retval++;
    130130    }
     
    162162
    163163    assert(bkpinfo != NULL);
    164     log_msg(1, "Comparing biggiefiles");
     164    mr_msg(1, "Comparing biggiefiles");
    165165
    166166    if (length_of_file(BIGGIELIST) < 6) {
    167         log_msg(1,
     167        mr_msg(1,
    168168                "OK, really teeny-tiny biggielist; not comparing biggiefiles");
    169169        return (0);
     
    171171    noof_biggiefiles = count_lines_in_file(BIGGIELIST);
    172172    if (noof_biggiefiles <= 0) {
    173         log_msg(1, "OK, no biggiefiles; not comparing biggiefiles");
     173        mr_msg(1, "OK, no biggiefiles; not comparing biggiefiles");
    174174        return (0);
    175175    }
     
    183183    for (bigfileno = 0; bigfileno < noof_biggiefiles; bigfileno++) {
    184184        mr_asprintf(&tmp, "Comparing big file #%ld", bigfileno + 1);
    185         log_msg(1, tmp);
     185        mr_msg(1, tmp);
    186186        update_progress_form(tmp);
    187187        mr_free(tmp);
     
    322322                "Differences found while processing fileset #%d       ",
    323323                current_tarball_number);
    324         log_msg(1, tmp);
     324        mr_msg(1, tmp);
    325325        mr_free(tmp);
    326326    }
     
    402402                       "/archives/slice* > /dev/null 2> /dev/null")
    403403                == 0) {
    404                 log_msg(2, "OK, I think I'm done with tarballs...");
     404                mr_msg(2, "OK, I think I'm done with tarballs...");
    405405                mr_free(tarball_fname);
    406406                break;
    407407            }
    408             log_msg(2, "OK, I think it's time for another CD...");
     408            mr_msg(2, "OK, I think it's time for another CD...");
    409409            g_current_media_number++;
    410410            mr_free(progress_str);
     
    590590            mr_free(tmp);
    591591
    592             log_msg(2, "calling popup_changelist_from_file()");
     592            mr_msg(2, "calling popup_changelist_from_file()");
    593593            popup_changelist_from_file("/tmp/changed.files");
    594             log_msg(2, "Returning from popup_changelist_from_file()");
     594            mr_msg(2, "Returning from popup_changelist_from_file()");
    595595        }
    596596    } else {
     
    650650    if (length_of_file("/tmp/changed.txt") > 2
    651651        && length_of_file("/tmp/changed.files") > 2) {
    652         log_msg(0,
     652        mr_msg(0,
    653653                "Type 'less /tmp/changed.files' to see which files don't match the archives");
    654         log_msg(2, "Calling popup_changelist_from_file()");
     654        mr_msg(2, "Calling popup_changelist_from_file()");
    655655        popup_changelist_from_file("/tmp/changed.files");
    656         log_msg(2, "Returned from popup_changelist_from_file()");
     656        mr_msg(2, "Returned from popup_changelist_from_file()");
    657657    }
    658658
  • trunk/mondo/src/mondorestore/mondo-rstr-newt.c

    r1084 r1086  
    16581658           sizeof(struct raid_device_record));
    16591659    mr_asprintf(&title_of_editraidForm_window, _("Edit %s"), raidrec->raid_device);
    1660     log_msg(2, "Opening newt window");
     1660    mr_msg(2, "Opening newt window");
    16611661    newtOpenWindow(20, 5, 40, 14, title_of_editraidForm_window);
    16621662    mr_free(title_of_editraidForm_window);
    16631663
    16641664    for (;;) {
    1665         log_msg(2, "Main loop");
     1665        mr_msg(2, "Main loop");
    16661666        mr_asprintf(&sz_raid_level,
    16671667               turn_raid_level_number_to_string(raidrec->raid_level));
  • trunk/mondo/src/mondorestore/mondo-rstr-tools.c

    r1084 r1086  
    194194        || (!does_file_exist(output_mountlist_file)
    195195            && does_file_exist(orig_fname))) {
    196         log_msg(2, "Failed to extract %s and/or %s from ramdisk",
     196        mr_msg(2, "Failed to extract %s and/or %s from ramdisk",
    197197                output_cfg_file, output_mountlist_file);
    198198        retval = 1;
     
    257257            "Checking to see if f=%s, file=%s, is in the list of biggiefiles",
    258258            f, file);
    259     log_msg(2, tmp);
     259    mr_msg(2, tmp);
    260260    mr_free(tmp);
    261261
     
    308308        run_program_and_log_output(command, 5);
    309309        mr_free(command);
    310         log_msg(2, "Setting isodir to %s", bkpinfo->isodir);
     310        mr_msg(2, "Setting isodir to %s", bkpinfo->isodir);
    311311    }
    312312
     
    331331                "The 'mount' command is '%s'. PLEASE report this command to be if you have problems, ok?",
    332332                mount_isodir_command);
    333         log_msg(1, tmp);
     333        mr_msg(1, tmp);
    334334        mr_free(tmp);
    335335
     
    352352    mr_asprintf(&tmp, "%s #%d has been mounted via loopback mount",
    353353            bkpinfo->backup_media_string, i);
    354     log_msg(1, tmp);
     354    mr_msg(1, tmp);
    355355    mr_free(tmp);
    356356
     
    360360        retval = 1;
    361361    }
    362     log_msg(2, "%ld: bkpinfo->isodir is now %s", __LINE__,
     362    mr_msg(2, "%ld: bkpinfo->isodir is now %s", __LINE__,
    363363            bkpinfo->isodir);
    364364    return (retval);
     
    409409    if (!strcmp(mpt, "/1")) {
    410410        mr_asprintf(&mountpoint, "/");
    411         log_msg(3, "Mommm! SME is being a dildo!");
     411        mr_msg(3, "Mommm! SME is being a dildo!");
    412412    } else {
    413413        mr_asprintf(&mountpoint, mpt);
     
    423423    }
    424424    mr_asprintf(&tmp, "Mounting device %s   ", device);
    425     log_msg(1, tmp);
     425    mr_msg(1, tmp);
    426426
    427427    if (writeable) {
     
    465465        mr_asprintf(&command, "mount -t %s %s %s %s 2>> %s", format, device,
    466466                additional_parameters, mountdir, MONDO_LOGFILE);
    467         log_msg(2, "command='%s'", command);
     467        mr_msg(2, "command='%s'", command);
    468468    }
    469469    mr_free(additional_parameters);
     
    471471    res = run_program_and_log_output(command, TRUE);
    472472    if (res && (strstr(command, "xattr") || strstr(command, "acl"))) {
    473         log_msg(1, "Re-trying without the fancy extra parameters");
     473        mr_msg(1, "Re-trying without the fancy extra parameters");
    474474        mr_free(command);
    475475
     
    479479    }
    480480    if (res) {
    481         log_msg(1, "Unable to mount device %s (type %s) at %s", device,
     481        mr_msg(1, "Unable to mount device %s (type %s) at %s", device,
    482482                format, mountdir);
    483         log_msg(1, "command was '%s'", command);
     483        mr_msg(1, "command was '%s'", command);
    484484        if (!strcmp(mountpoint, "swap")) {
    485485            log_to_screen(tmp);
    486486        } else {
    487             log_msg(2, "Retrying w/o the '-t' switch");
     487            mr_msg(2, "Retrying w/o the '-t' switch");
    488488            mr_free(command);
    489489
    490490            mr_asprintf(&command, "mount %s %s 2>> %s", device, mountdir,
    491491                    MONDO_LOGFILE);
    492             log_msg(2, "2nd command = '%s'", command);
     492            mr_msg(2, "2nd command = '%s'", command);
    493493            res = run_program_and_log_output(command, TRUE);
    494494            if (res == 0) {
    495                 log_msg(1,
     495                mr_msg(1,
    496496                        "That's OK. I called mount w/o a filesystem type and it worked fine in the end.");
    497497            } else {
     
    505505
    506506    if (res && !strcmp(mountpoint, "swap")) {
    507         log_msg(2, "That's ok. It's just a swap partition.");
    508         log_msg(2, "Non-fatal error. Returning 0.");
     507        mr_msg(2, "That's ok. It's just a swap partition.");
     508        mr_msg(2, "Non-fatal error. Returning 0.");
    509509        res = 0;
    510510    }
     
    550550    for (lino = 0; lino < mountlist->entries; lino++) {
    551551        if (!strcmp(mountlist->el[lino].device, "/proc")) {
    552             log_msg(1,
     552            mr_msg(1,
    553553                    "Again with the /proc - why is this in your mountlist?");
    554554        } else if (is_this_device_mounted(mountlist->el[lino].device)) {
     
    649649    if (bkpinfo->backup_media_type == tape
    650650        || bkpinfo->backup_media_type == udev) {
    651         log_msg(8, "Tape/udev. Therefore, no need to mount CDROM.");
     651        mr_msg(8, "Tape/udev. Therefore, no need to mount CDROM.");
    652652        return 0;
    653653    }
    654654
    655655    if (!run_program_and_log_output("mount | grep -F " MNT_CDROM, FALSE)) {
    656         log_msg(2, "mount_cdrom() - CD already mounted. Fair enough.");
     656        mr_msg(2, "mount_cdrom() - CD already mounted. Fair enough.");
    657657        return (0);
    658658    }
    659659
    660660    if (bkpinfo->backup_media_type == nfs) {
    661         log_msg(2, "Mounting for NFS thingy");
    662         log_msg(2, "isodir = %s", bkpinfo->isodir);
     661        mr_msg(2, "Mounting for NFS thingy");
     662        mr_msg(2, "isodir = %s", bkpinfo->isodir);
    663663        if ((!bkpinfo->isodir || !strcmp(bkpinfo->isodir, "/"))
    664664            && am_I_in_disaster_recovery_mode()) {
    665665            mr_allocstr(bkpinfo->isodir, "/tmp/isodir");
    666             log_msg(1, "isodir is being set to %s", bkpinfo->isodir);
     666            mr_msg(1, "isodir is being set to %s", bkpinfo->isodir);
    667667        }
    668668#ifdef __FreeBSD__
     
    728728
    729729    }
    730     log_msg(2, "(mount_cdrom) --- command = %s", mount_cmd);
     730    mr_msg(2, "(mount_cdrom) --- command = %s", mount_cmd);
    731731    for (i = 0; i < 2; i++) {
    732732        res = run_program_and_log_output(mount_cmd, FALSE);
     
    734734            break;
    735735        } else {
    736             log_msg(2, "Failed to mount CD-ROM drive.");
     736            mr_msg(2, "Failed to mount CD-ROM drive.");
    737737            sleep(5);
    738738            run_program_and_log_output("sync", FALSE);
     
    742742
    743743    if (res) {
    744         log_msg(2, "Failed, despite %d attempts", i);
    745     } else {
    746         log_msg(2, "Mounted CD-ROM drive OK");
     744        mr_msg(2, "Failed, despite %d attempts", i);
     745    } else {
     746        mr_msg(2, "Mounted CD-ROM drive OK");
    747747    }
    748748    return (res);
     
    830830                /* Check to see if CD is already mounted before mounting it... */
    831831                if (!is_this_device_mounted("/dev/cdrom")) {
    832                     log_msg(2,
     832                    mr_msg(2,
    833833                            "NB: CDROM device not mounted, mounting...");
    834834                    run_program_and_log_output("mount /dev/cdrom "
     
    897897            mr_asprintf(&tmp, "Backup medium is TAPE --- dev=%s",
    898898                    bkpinfo->media_device);
    899             log_msg(2, tmp);
     899            mr_msg(2, tmp);
    900900            mr_free(tmp);
    901901        } else {
     
    903903            bkpinfo->media_size[0] = 1999 * 1024;   /* 650, probably, but we don't need this var anyway */
    904904            bkpinfo->media_size[1] = 1999 * 1024;   /* 650, probably, but we don't need this var anyway */
    905             log_msg(2, "Backup medium is CD-R[W]");
    906         }
    907     } else {
    908         log_msg(2,
     905            mr_msg(2, "Backup medium is CD-R[W]");
     906        }
     907    } else {
     908        mr_msg(2,
    909909                "Not in Disaster Recovery Mode. No need to derive device name from config file.");
    910910    }
     
    913913    if (strstr(value, "yes")) {
    914914        bkpinfo->use_star = TRUE;
    915         log_msg(1, "Goody! ... bkpinfo->use_star is now true.");
     915        mr_msg(1, "Goody! ... bkpinfo->use_star is now true.");
    916916    }
    917917    mr_free(value);
     
    920920    if (strstr(value, "TRUE")) {
    921921        mr_asprintf(&g_getfacl,"setfacl");
    922         log_msg(1, "We will restore ACLs");
     922        mr_msg(1, "We will restore ACLs");
    923923        if (! find_home_of_exe("setfacl")) {
    924             log_msg(1, "Unable to restore ACLs as no setfacl found");
     924            mr_msg(1, "Unable to restore ACLs as no setfacl found");
    925925        }
    926926    }
     
    928928    if (strstr(value, "TRUE")) {
    929929        mr_asprintf(&g_getfattr,"setfattr");
    930         log_msg(1, "We will restore XATTRs");
     930        mr_msg(1, "We will restore XATTRs");
    931931        if (! find_home_of_exe("setfattr")) {
    932             log_msg(1, "Unable to restore XATTRs as no setfattr found");
     932            mr_msg(1, "Unable to restore XATTRs as no setfattr found");
    933933        }
    934934    }
     
    936936    if (0 == read_cfg_var(cfg_file, "internal-tape-block-size", value)) {
    937937        bkpinfo->internal_tape_block_size = atol(value);
    938         log_msg(1, "Internal tape block size has been custom-set to %ld",
     938        mr_msg(1, "Internal tape block size has been custom-set to %ld",
    939939                bkpinfo->internal_tape_block_size);
    940940    } else {
    941941        bkpinfo->internal_tape_block_size =
    942942            DEFAULT_INTERNAL_TAPE_BLOCK_SIZE;
    943         log_msg(1, "Internal tape block size = default (%ld)",
     943        mr_msg(1, "Internal tape block size = default (%ld)",
    944944                DEFAULT_INTERNAL_TAPE_BLOCK_SIZE);
    945945    }
     
    980980        bkpinfo->differential = TRUE;
    981981    }
    982     log_msg(2, "differential var = '%s'", value);
     982    mr_msg(2, "differential var = '%s'", value);
    983983    mr_free(value);
    984984
    985985    if (bkpinfo->differential) {
    986         log_msg(2, "THIS IS A DIFFERENTIAL BACKUP");
    987     } else {
    988         log_msg(2, "This is a regular (full) backup");
     986        mr_msg(2, "THIS IS A DIFFERENTIAL BACKUP");
     987    } else {
     988        mr_msg(2, "This is a regular (full) backup");
    989989    }
    990990
     
    997997    if ((tmp != NULL) || strstr(tmp1,"donteject")) {
    998998        bkpinfo->please_dont_eject = TRUE;
    999         log_msg(2, "Ok, I shan't eject when restoring! Groovy.");
     999        mr_msg(2, "Ok, I shan't eject when restoring! Groovy.");
    10001000    }
    10011001    mr_free(tmp);
     
    10041004    if (bkpinfo->backup_media_type == nfs) {
    10051005        if (!cfgf) {
    1006             log_msg(2, "nfs_mount remains %s", bkpinfo->nfs_mount);
    1007             log_msg(2, "nfs_remote_dir remains %s",
     1006            mr_msg(2, "nfs_mount remains %s", bkpinfo->nfs_mount);
     1007            mr_msg(2, "nfs_remote_dir remains %s",
    10081008                    bkpinfo->nfs_remote_dir);
    1009             log_msg(2,
     1009            mr_msg(2,
    10101010                    "...cos it wouldn't make sense to abandon the values that GOT ME to this config file in the first place");
    10111011        } else {
     
    10161016            read_cfg_var(g_mondo_cfg_file, "nfs-server-path",
    10171017                         bkpinfo->nfs_remote_dir);
    1018             log_msg(2, "nfs_mount is %s", bkpinfo->nfs_mount);
    1019             log_msg(2, "nfs_remote_dir is %s", bkpinfo->nfs_remote_dir);
     1018            mr_msg(2, "nfs_mount is %s", bkpinfo->nfs_mount);
     1019            mr_msg(2, "nfs_remote_dir is %s", bkpinfo->nfs_remote_dir);
    10201020        }
    10211021        if (strstr(call_program_and_get_last_line_of_output
     
    10601060        mr_free(g_isodir_device);
    10611061        read_cfg_var(g_mondo_cfg_file, "iso-dev", g_isodir_device);
    1062         log_msg(2, "isodir=%s; iso-dev=%s", bkpinfo->isodir, g_isodir_device);
     1062        mr_msg(2, "isodir=%s; iso-dev=%s", bkpinfo->isodir, g_isodir_device);
    10631063        if (bkpinfo->disaster_recovery) {
    10641064            if (is_this_device_mounted(g_isodir_device)) {
    1065                 log_msg(2, "NB: isodir is already mounted");
     1065                mr_msg(2, "NB: isodir is already mounted");
    10661066                /* Find out where it's mounted */
    10671067                mr_asprintf(&command,
     
    10811081                mr_asprintf(&tmp, "mount %s %s", g_isodir_device, iso_mnt);
    10821082                if (run_program_and_log_output(tmp, 3)) {
    1083                     log_msg(1,
     1083                    mr_msg(1,
    10841084                            "Unable to mount isodir. Perhaps this is really a CD backup?");
    10851085                    bkpinfo->backup_media_type = cdr;
     
    10951095                            ("Unable to mount isodir. Failed to mount CD-ROM as well.");
    10961096                    } else {
    1097                         log_msg(1,
     1097                        mr_msg(1,
    10981098                                "You backed up to disk, then burned some CDs.");
    10991099                    }
     
    11141114        if (g_restoring_live_from_cd) {
    11151115            if (bkpinfo->backup_media_type != media_specified_by_user) {
    1116                 log_msg(2,
     1116                mr_msg(2,
    11171117                        "bkpinfo->backup_media_type != media_specified_by_user, so I'd better ask :)");
    11181118                interactively_obtain_media_parameters_from_user(bkpinfo, FALSE);
     
    11631163    if (does_file_exist(g_filelist_full)
    11641164        && does_file_exist(g_biggielist_txt)) {
    1165         log_msg(1, "%s exists", g_filelist_full);
    1166         log_msg(1, "%s exists", g_biggielist_txt);
    1167         log_msg(2,
     1165        mr_msg(1, "%s exists", g_filelist_full);
     1166        mr_msg(1, "%s exists", g_biggielist_txt);
     1167        mr_msg(2,
    11681168                "Filelist and biggielist already recovered from media. Yay!");
    11691169    } else {
    11701170        getcwd(tmp, MAX_STR_LEN);
    11711171        chdir(bkpinfo->tmpdir);
    1172         log_msg(1, "chdir(%s)", bkpinfo->tmpdir);
     1172        mr_msg(1, "chdir(%s)", bkpinfo->tmpdir);
    11731173        log_to_screen("Extracting filelist and biggielist from media...");
    11741174        unlink("/tmp/filelist.full");
     
    11831183                    FILELIST_FULL_STUB,
    11841184                    "tmp/i-want-my-lvm", MONDO_CFG_FILE_STUB);
    1185             log_msg(1, "tarcommand = %s", command);
     1185            mr_msg(1, "tarcommand = %s", command);
    11861186            run_program_and_log_output(command, 1);
    11871187            mr_free(command);
    11881188        } else {
    1189             log_msg(2,
     1189            mr_msg(2,
    11901190                    "Calling insist_on_this_cd_number; bkpinfo->isodir=%s",
    11911191                    bkpinfo->isodir);
    11921192            insist_on_this_cd_number(bkpinfo, 1);
    1193             log_msg(2, "Back from iotcn");
     1193            mr_msg(2, "Back from iotcn");
    11941194            run_program_and_log_output("mount", 1);
    11951195            mr_asprintf(&command,
     
    12011201                    "tmp/i-want-my-lvm", MONDO_CFG_FILE_STUB);
    12021202
    1203             log_msg(1, "tarcommand = %s", command);
     1203            mr_msg(1, "tarcommand = %s", command);
    12041204            run_program_and_log_output(command, 1);
    12051205            mr_free(command);
     
    12211221        mr_asprintf(&command, "cp -f %s/%s %s", bkpinfo->tmpdir,
    12221222                BIGGIELIST_TXT_STUB, g_biggielist_txt);
    1223         log_msg(1, "command = %s", command);
     1223        mr_msg(1, "command = %s", command);
    12241224        paranoid_system(command);
    12251225        mr_free(command);
     
    12271227        mr_asprintf(&command, "ln -sf %s/%s %s", bkpinfo->tmpdir,
    12281228                FILELIST_FULL_STUB, g_filelist_full);
    1229         log_msg(1, "command = %s", command);
     1229        mr_msg(1, "command = %s", command);
    12301230        paranoid_system(command);
    12311231        mr_free(command);
     
    12471247
    12481248    if (!does_file_exist(g_biggielist_txt)) {
    1249         log_msg(1, "Warning - %s not found", g_biggielist_txt);
     1249        mr_msg(1, "Warning - %s not found", g_biggielist_txt);
    12501250    }
    12511251    if (!does_file_exist(g_filelist_full)) {
    1252         log_msg(1, "Warning - %s does not exist", g_filelist_full);
     1252        mr_msg(1, "Warning - %s does not exist", g_filelist_full);
    12531253    }
    12541254//  popup_and_OK("Wonderful.");
    12551255
    1256     log_msg(2, "Forking");
     1256    mr_msg(2, "Forking");
    12571257    pid = fork();
    12581258    switch (pid) {
     
    12841284    close_evalcall_form();
    12851285
    1286     log_msg(3, "loading filelist");
     1286    mr_msg(3, "loading filelist");
    12871287    filelist = load_filelist(g_filelist_full);
    1288     log_msg(3, "deleting original filelist");
     1288    mr_msg(3, "deleting original filelist");
    12891289    unlink(g_filelist_full);
    12901290    if (g_text_mode) {
     
    13021302    }
    13031303    if (res) {
    1304         log_msg(2, "User hit 'cancel'. Freeing filelist and aborting.");
     1304        mr_msg(2, "User hit 'cancel'. Freeing filelist and aborting.");
    13051305        free_filelist(filelist);
    13061306        return (NULL);
     
    13701370    read_cfg_var(g_mondo_cfg_file, "bootloader.name", name);
    13711371    mr_asprintf(&tmp, "run_boot_loader: device='%s', name='%s'", device, name);
    1372     log_msg(2, tmp);
     1372    mr_msg(2, tmp);
    13731373    mr_free(tmp);
    13741374
     
    13861386//      else
    13871387//        {
    1388 //    log_msg(1, "Not running run_grub(). Was a bad idea anyway.");
     1388//    mr_msg(1, "Not running run_grub(). Was a bad idea anyway.");
    13891389//    res = 1;
    13901390//  }
     
    14041404            res = run_program_and_log_output(tmp, 3);
    14051405        } else {
    1406             log_msg(1,
     1406            mr_msg(1,
    14071407                    "I'm not running any boot loader. You have a DD boot drive. It's already loaded up.");
    14081408        }
     
    14641464    tmp = find_home_of_exe(output);
    14651465    if (!tmp) {
    1466         log_msg(2, " (find_my_editor) --- warning - %s not found", output);
     1466        mr_msg(2, " (find_my_editor) --- warning - %s not found", output);
    14671467    }
    14681468    mr_free(tmp);
     
    15361536        /* nuke mode */
    15371537        if (!run_program_and_log_output("which grub-MR", FALSE)) {
    1538             log_msg(1, "Yay! grub-MR found...");
     1538            mr_msg(1, "Yay! grub-MR found...");
    15391539            mr_asprintf(&command, "grub-MR %s /tmp/mountlist.txt", bd);
    1540             log_msg(1, "command = %s", command);
     1540            mr_msg(1, "command = %s", command);
    15411541        } else {
    15421542            mr_asprintf(&command, "chroot " MNT_RESTORING " grub-install %s", bd);
    1543             log_msg(1, "WARNING - grub-MR not found; using grub-install");
     1543            mr_msg(1, "WARNING - grub-MR not found; using grub-install");
    15441544        }
    15451545        mvaddstr_and_log_it(g_currentY,
     
    15661566            (_
    15671567             ("GRUB ran w/error(s). See /tmp/mondo-restore.log for more info."));
    1568         log_msg(1, "Type:-");
    1569         log_msg(1, "    mount-me");
    1570         log_msg(1, "    chroot " MNT_RESTORING);
    1571         log_msg(1, "    mount /boot");
    1572         log_msg(1, "    grub-install '(hd0)'");
    1573         log_msg(1, "    exit");
    1574         log_msg(1, "    unmount-me");
    1575         log_msg(1,
     1568        mr_msg(1, "Type:-");
     1569        mr_msg(1, "    mount-me");
     1570        mr_msg(1, "    chroot " MNT_RESTORING);
     1571        mr_msg(1, "    mount /boot");
     1572        mr_msg(1, "    grub-install '(hd0)'");
     1573        mr_msg(1, "    exit");
     1574        mr_msg(1, "    unmount-me");
     1575        mr_msg(1,
    15761576                "If you're really stuck, please e-mail the mailing list.");
    15771577    } else {
     
    18291829                            ("Restoring MBR...                                               "));
    18301830        mr_asprintf(&command, "raw-MR %s /tmp/mountlist.txt", bd);
    1831         log_msg(2, "run_raw_mbr() --- command='%s'", command);
     1831        mr_msg(2, "run_raw_mbr() --- command='%s'", command);
    18321832        res = run_program_and_log_output(command, 3);
    18331833        mr_free(command);
     
    19991999void termination_in_progress(int sig)
    20002000{
    2001     log_msg(1, "Termination in progress");
     2001    mr_msg(1, "Termination in progress");
    20022002    usleep(1000);
    20032003    pthread_exit(0);
     
    20472047         i++) {
    20482048        sleep(1);
    2049         log_msg(2, "Waiting for buffer() to finish");
     2049        mr_msg(2, "Waiting for buffer() to finish");
    20502050    }
    20512051
     
    20542054    if (run_program_and_log_output
    20552055        ("cp -f /tmp/mondo-restore.log " MNT_RESTORING "/tmp/", FALSE)) {
    2056         log_msg(1,
     2056        mr_msg(1,
    20572057                "Error. Failed to copy log to PC's /tmp dir. (Mounted read-only?)");
    20582058    }
    20592059    if (run_program_and_log_output
    20602060        ("cp -f /tmp/mondo-restore.log " MNT_RESTORING "/root/", FALSE)) {
    2061         log_msg(1,
     2061        mr_msg(1,
    20622062                "Error. Failed to copy log to PC's /root dir. (Mounted read-only?)");
    20632063    }
     
    20812081                if (!strcmp(mountlist->el[lino].mountpoint, "/1")) {
    20822082                    mr_asprintf(&command, "umount %s/", MNT_RESTORING);
    2083                     log_msg(3,
     2083                    mr_msg(3,
    20842084                            "Well, I know a certain kitty-kitty who'll be sleeping with Mommy tonight...");
    20852085                } else {
     
    20882088                }
    20892089            }
    2090             log_msg(10, "The 'umount' command is '%s'", command);
     2090            mr_msg(10, "The 'umount' command is '%s'", command);
    20912091            res = run_program_and_log_output(command, 3);
    20922092            mr_free(command);
     
    21052105            log_to_screen(tmp);
    21062106        } else {
    2107             log_msg(2, tmp);
     2107            mr_msg(2, tmp);
    21082108        }
    21092109        mr_free(tmp);
     
    21492149            MOUNTLIST_FNAME_STUB, MONDO_CFG_FILE_STUB,
    21502150            BIGGIELIST_TXT_STUB, FILELIST_FULL_STUB, "tmp/i-want-my-lvm");
    2151     log_msg(2, "command = '%s'", command);
     2151    mr_msg(2, "command = '%s'", command);
    21522152    res = run_program_and_log_output(command, -1);
    21532153    mr_free(command);
     
    21852185
    21862186    assert(bkpinfo != NULL);
    2187     log_msg(2, "gcffa --- starting");
     2187    mr_msg(2, "gcffa --- starting");
    21882188    log_to_screen(_("I'm thinking..."));
    21892189    mr_asprintf(&mountpt, "%s/mount.bootdisk", bkpinfo->tmpdir);
     
    22022202    mr_asprintf(&mountlist_file, "%s/%s", bkpinfo->tmpdir,
    22032203            MOUNTLIST_FNAME_STUB);
    2204     log_msg(2, "mountpt = %s; cfg_file=%s", mountpt, cfg_file);
     2204    mr_msg(2, "mountpt = %s; cfg_file=%s", mountpt, cfg_file);
    22052205
    22062206    /* Floppy? */
     
    22172217            "(sleep 15; kill `ps | grep \"%s\" | cut -d' ' -f1` 2> /dev/null) &",
    22182218            command);
    2219     log_msg(1, "tmp = '%s'", tmp);
     2219    mr_msg(1, "tmp = '%s'", tmp);
    22202220    system(tmp);
    22212221    mr_free(tmp);
     
    22332233    } else {
    22342234        try_plan_B = TRUE;
    2235         log_msg(2,
     2235        mr_msg(2,
    22362236                "Mounted floppy OK but I don't trust it because the archives might contain more up-to-date config file than the floppy does.");
    22372237// NB: If busybox does not support 'mount -o loop' then Plan A WILL NOT WORK.
    2238         log_msg(2, "Processing floppy (plan A?)");
     2238        mr_msg(2, "Processing floppy (plan A?)");
    22392239        mr_asprintf(&ramdisk_fname, "%s/mindi.rdz", mountpt);
    22402240        if (!does_file_exist(ramdisk_fname)) {
     
    22432243        }
    22442244        if (!does_file_exist(ramdisk_fname)) {
    2245             log_msg(2,
     2245            mr_msg(2,
    22462246                    "Cannot find ramdisk file on mountpoint. Are you sure that's a boot disk in the drive?");
    22472247        }
    22482248        if (extract_config_file_from_ramdisk
    22492249            (bkpinfo, ramdisk_fname, cfg_file, mountlist_file)) {
    2250             log_msg(2,
     2250            mr_msg(2,
    22512251                    "Warning - failed to extract config file from ramdisk. I think this boot disk is mangled.");
    22522252        }
     
    22592259    }
    22602260    if (!does_file_exist(cfg_file)) {
    2261         log_msg(2, "gcffa --- we don't have cfg file yet.");
     2261        mr_msg(2, "gcffa --- we don't have cfg file yet.");
    22622262        if (IS_THIS_A_STREAMING_BACKUP(bkpinfo->backup_media_type)) {
    22632263            try_plan_B = TRUE;
    22642264        } else {
    2265             log_msg(2, "gcffa --- calling mount_cdrom now :)");
     2265            mr_msg(2, "gcffa --- calling mount_cdrom now :)");
    22662266            if (!mount_cdrom(bkpinfo)) {
    2267                 log_msg(2,
     2267                mr_msg(2,
    22682268                        "gcffa --- managed to mount CD; so, no need for Plan B");
    22692269                try_plan_B = FALSE;
     
    22772277        }
    22782278        if (try_plan_B) {
    2279             log_msg(2, "gcffa --- OK, switching to Plan B");
     2279            mr_msg(2, "gcffa --- OK, switching to Plan B");
    22802280            chdir(bkpinfo->tmpdir);
    22812281            run_program_and_log_output("mkdir -p tmp", FALSE);
     
    22832283            if (bkpinfo->media_device == NULL) {
    22842284                mr_asprintf(&bkpinfo->media_device, "/dev/st0");
    2285                 log_msg(2, "media_device is blank; assuming %s",
     2285                mr_msg(2, "media_device is blank; assuming %s",
    22862286                        bkpinfo->media_device);
    22872287            }
     
    22982298                        if (extract_cfg_file_and_mountlist_from_tape_dev
    22992299                            (bkpinfo->media_device)) {
    2300                             log_msg(3,
     2300                            mr_msg(3,
    23012301                                    "I tried lots of devices but none worked.");
    23022302                            mr_allocstr(bkpinfo->media_device, sav);
     
    23132313            }
    23142314        } else {
    2315             log_msg(2,
     2315            mr_msg(2,
    23162316                    "gcffa --- looking at mounted CD for mindi-boot.2880.img");
    23172317            /* BERLIOS : Useless ?
     
    23222322            mr_asprintf(&mounted_cfgf_path, "%s/%s", mountpt, cfg_file);
    23232323            if (!does_file_exist(mounted_cfgf_path)) {
    2324                 log_msg(2,
     2324                mr_msg(2,
    23252325                        "gcffa --- Plan C, a.k.a. untarring some file from all.tar.gz");
    23262326                mr_asprintf(&command, "tar -zxvf " MNT_CDROM "/images/all.tar.gz %s %s %s %s %s", MOUNTLIST_FNAME_STUB, MONDO_CFG_FILE_STUB, BIGGIELIST_TXT_STUB, FILELIST_FULL_STUB, "tmp/i-want-my-lvm"); // add -b TAPE_BLOCK_SIZE if you _really_ think it's necessary
     
    23392339
    23402340    if (does_file_exist(MONDO_CFG_FILE_STUB)) {
    2341         log_msg(1, "gcffa --- great! We've got the config file");
     2341        mr_msg(1, "gcffa --- great! We've got the config file");
    23422342        tmp1 = call_program_and_get_last_line_of_output("pwd");
    23432343        mr_asprintf(&tmp, "%s/%s", tmp1,MONDO_CFG_FILE_STUB);
     
    23472347        if (strcmp(tmp, cfg_file)
    23482348            && run_program_and_log_output(command, 1)) {
    2349             log_msg(1,
     2349            mr_msg(1,
    23502350                    "... but an error occurred when I tried to move it to %s",
    23512351                    cfg_file);
    23522352        } else {
    2353             log_msg(1, "... and I moved it successfully to %s", cfg_file);
     2353            mr_msg(1, "... and I moved it successfully to %s", cfg_file);
    23542354        }
    23552355        mr_free(command);
     
    23622362        if (strcmp(tmp, cfg_file)
    23632363            && run_program_and_log_output(command, 1)) {
    2364             log_msg(1, "Failed to get mountlist");
     2364            mr_msg(1, "Failed to get mountlist");
    23652365        } else {
    2366             log_msg(1, "Got mountlist too");
     2366            mr_msg(1, "Got mountlist too");
    23672367            mr_free(command);
    23682368            mr_asprintf(&command, "cp -f %s %s", mountlist_file,
    23692369                    g_mountlist_fname);
    23702370            if (run_program_and_log_output(command, 1)) {
    2371                 log_msg(1, "Failed to copy mountlist to /tmp");
     2371                mr_msg(1, "Failed to copy mountlist to /tmp");
    23722372            } else {
    2373                 log_msg(1, "Copied mountlist to /tmp as well OK");
     2373                mr_msg(1, "Copied mountlist to /tmp as well OK");
    23742374                mr_free(command);
    23752375                mr_asprintf(&command, "cp -f tmp/i-want-my-lvm /tmp/");
     
    23832383    if (!does_file_exist(cfg_file)) {
    23842384        iamhere(cfg_file);
    2385         log_msg(1, "%s not found", cfg_file);
     2385        mr_msg(1, "%s not found", cfg_file);
    23862386        log_to_screen
    23872387            (_
     
    24482448        if (parse_mdstat(raidlist, "/dev/")) {
    24492449            log_to_screen("Sorry, cannot read %s", MDSTAT_FILE);
    2450             log_msg(1, "Sorry, cannot read %s", MDSTAT_FILE);
     2450            mr_msg(1, "Sorry, cannot read %s", MDSTAT_FILE);
    24512451            return;
    24522452        }
     
    24552455            if (raidlist->el[i].progress < wait_for_percentage) {
    24562456                unfinished_mdstat_devices++;
    2457                 log_msg(1, "Sync'ing %s (i=%d)",
     2457                mr_msg(1, "Sync'ing %s (i=%d)",
    24582458                        raidlist->el[i].raid_device, i);
    24592459                mr_asprintf(&screen_message, "Sync'ing %s",
     
    24662466                }
    24672467                while (raidlist->el[i].progress < wait_for_percentage) {
    2468                     log_msg(1, "Percentage sync'ed: %d",
     2468                    mr_msg(1, "Percentage sync'ed: %d",
    24692469                            raidlist->el[i].progress);
    24702470                    update_evalcall_form(raidlist->el[i].progress);
Note: See TracChangeset for help on using the changeset viewer.