Changeset 1086 in MondoRescue for trunk/mondo/src/common/libmondo-archive.c


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

log_msg => mr_msg in trunk

File:
1 edited

Legend:

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

    r1081 r1086  
    142142
    143143    if (semctl(g_sem_id, 0, IPC_RMID, sem_union) == -1) {
    144         log_msg(3, "Failed to delete semaphore");
     144        mr_msg(3, "Failed to delete semaphore");
    145145    }
    146146}
     
    159159    sem_b.sem_flg = SEM_UNDO;
    160160    if (semop(g_sem_id, &sem_b, 1) == -1) {
    161         log_msg(3, "semaphore_p failed");
     161        mr_msg(3, "semaphore_p failed");
    162162        return (0);
    163163    }
     
    177177    sem_b.sem_flg = SEM_UNDO;
    178178    if (semop(g_sem_id, &sem_b, 1) == -1) {
    179         log_msg(3, "semaphore_v failed");
     179        mr_msg(3, "semaphore_v failed");
    180180        return (0);
    181181    }
     
    237237    mr_free(command);
    238238    command = tmp;
    239     log_msg(4, "command = '%s'", command);
     239    mr_msg(4, "command = '%s'", command);
    240240
    241241    for (res = 99, tries = 0; tries < 3 && res != 0; tries++) {
    242         log_msg(5, "command='%s'", command);
     242        mr_msg(5, "command='%s'", command);
    243243        res = system(command);
    244244        tmp = last_line_of_file(MONDO_LOGFILE);
    245         log_msg(1, "res=%d; tmp='%s'", res, tmp);
     245        mr_msg(1, "res=%d; tmp='%s'", res, tmp);
    246246        if (bkpinfo->use_star && (res == 254 || res == 65024)
    247247            && strstr(tmp, "star: Processed all possible files")
    248248            && tries > 0) {
    249             log_msg(1, "Star returned nonfatal error");
     249            mr_msg(1, "Star returned nonfatal error");
    250250            res = 0;
    251251        }
     
    256256            if (p) {
    257257                p[0] = p[1] = p[2] = p[3] = ' ';
    258                 log_msg(1, "new command = '%s'", command);
     258                mr_msg(1, "new command = '%s'", command);
    259259            } else {
    260                 log_msg(3,
     260                mr_msg(3,
    261261                        "Attempt #%d failed. Pausing 3 seconds and retrying...",
    262262                        tries + 1);
     
    269269    retval += res;
    270270    if (retval) {
    271         log_msg(3, "Failed to write set %d", setno);
     271        mr_msg(3, "Failed to write set %d", setno);
    272272    } else if (tries > 1) {
    273         log_msg(3, "Succeeded in writing set %d, on try #%d", setno,
     273        mr_msg(3, "Succeeded in writing set %d, on try #%d", setno,
    274274                tries);
    275275    }
     
    348348        } else {
    349349            mr_asprintf(&zipparams, " ");
    350             log_msg(3, "%s not found. Cannot exclude zipfiles, etc.", tmp);
     350            mr_msg(3, "%s not found. Cannot exclude zipfiles, etc.", tmp);
    351351        }
    352352        mr_free(tmp);
     
    381381
    382382    for (res = 99, tries = 0; tries < 3 && res != 0; tries++) {
    383         log_msg(5, "command='%s'", command);
     383        mr_msg(5, "command='%s'", command);
    384384        res = system(command);
    385385        if (res) {
    386386            log_OS_error(command);
    387             log_msg(3,
     387            mr_msg(3,
    388388                    "Attempt #%d failed. Pausing 3 seconds and retrying...",
    389389                    tries + 1);
     
    395395    retval += res;
    396396    if (retval) {
    397         log_msg(3, "Failed to write set %d", setno);
     397        mr_msg(3, "Failed to write set %d", setno);
    398398    } else if (tries > 1) {
    399         log_msg(3, "Succeeded in writing set %d, on try #%d", setno,
     399        mr_msg(3, "Succeeded in writing set %d, on try #%d", setno,
    400400                tries);
    401401    }
     
    410410            if (free_ramdisk_space > i) {
    411411                free_ramdisk_space = i;
    412                 log_msg(2, "min(free_ramdisk_space) is now %d",
     412                mr_msg(2, "min(free_ramdisk_space) is now %d",
    413413                        free_ramdisk_space);
    414414                if (free_ramdisk_space < 10) {
     
    507507    retval += make_those_slices_phase(bkpinfo); // backup BIG files
    508508    retval += do_that_final_phase(bkpinfo); // clean up
    509     log_msg(1, "Creation of archives... complete.");
     509    mr_msg(1, "Creation of archives... complete.");
    510510    if (bkpinfo->verify_data) {
    511511        sleep(2);
     
    581581    mr_free(tmp);
    582582    mr_asprintf(&tmp, "devs_to_exclude = '%s'", devs_to_exclude);
    583     log_msg(2, tmp);
     583    mr_msg(2, tmp);
    584584    mr_free(tmp);
    585585    mvaddstr_and_log_it(g_currentY, 0,
     
    673673            mr_asprintf(&tmp, "User specified boot loader. It is '%c'.",
    674674                     bkpinfo->boot_loader);
    675             log_msg(2, tmp);
     675            mr_msg(2, tmp);
    676676            mr_free(tmp);
    677677        } else {
     
    681681            mr_asprintf(&tmp, "User specified boot device. It is '%s'.",
    682682                     bkpinfo->boot_device);
    683             log_msg(2, tmp);
     683            mr_msg(2, tmp);
    684684            mr_free(tmp);
    685685            mr_free(bootdev);
     
    759759    mr_asprintf(&tmp, "%s/BOOTLOADER.DEVICE", bkpinfo->tmpdir);
    760760    if (write_one_liner_data_file(tmp, bkpinfo->boot_device)) {
    761         log_msg(1, "%ld: Unable to write one-liner boot device", __LINE__);
     761        mr_msg(1, "%ld: Unable to write one-liner boot device", __LINE__);
    762762    }
    763763    mr_free(tmp);
     
    797797    if (write_one_liner_data_file(tmp, value)) {
    798798        res++;
    799         log_msg(1, "%ld: Unable to write one-liner backup-media-type",
     799        mr_msg(1, "%ld: Unable to write one-liner backup-media-type",
    800800                __LINE__);
    801801    }
     
    806806    if (write_one_liner_data_file(tmp, bootldr_str)) {
    807807        res++;
    808         log_msg(1, "%ld: Unable to write one-liner bootloader.name",
     808        mr_msg(1, "%ld: Unable to write one-liner bootloader.name",
    809809                __LINE__);
    810810    }
     
    822822        mr_asprintf(&tmp1, "%s/XATTR", bkpinfo->tmpdir);
    823823        if (write_one_liner_data_file(tmp1, "TRUE")) {
    824             log_msg(1, "%ld: Unable to write one-liner XATTR",
     824            mr_msg(1, "%ld: Unable to write one-liner XATTR",
    825825                __LINE__);
    826826        }
     
    830830        mr_asprintf(&tmp1, "%s/ACL", bkpinfo->tmpdir);
    831831        if (write_one_liner_data_file(tmp1, "TRUE")) {
    832             log_msg(1, "%ld: Unable to write one-liner ACL",
     832            mr_msg(1, "%ld: Unable to write one-liner ACL",
    833833                __LINE__);
    834834        }
     
    857857    mr_free(tmp);
    858858
    859     log_msg(1, "lines_in_filelist = %ld", lines_in_filelist);
     859    mr_msg(1, "lines_in_filelist = %ld", lines_in_filelist);
    860860
    861861    if (bkpinfo->backup_media_type == usb) {
     
    911911    mr_free(tmp2);
    912912
    913     log_msg(2, command);
     913    mr_msg(2, command);
    914914
    915915    //  popup_and_OK("Pausing");
     
    924924        log_to_screen("Boot+data disks were created OK");
    925925        mr_asprintf(&command, "mkdir -p /var/cache/mindi/");
    926         log_msg(2, command);
     926        mr_msg(2, command);
    927927        run_program_and_log_output(command, FALSE);
    928928        mr_free(command);
     
    931931                 "cp -f %s/images/mindi.iso /var/cache/mindi/mondorescue.iso",
    932932                 bkpinfo->scratchdir);
    933         log_msg(2, command);
     933        mr_msg(2, command);
    934934        run_program_and_log_output(command, FALSE);
    935935        mr_free(command);
     
    945945        mr_asprintf(&command, "cp -f %s/mindi-*oot*.img %s/images",
    946946                 bkpinfo->tmpdir, bkpinfo->scratchdir);
    947         log_msg(2, command);
     947        mr_msg(2, command);
    948948        run_program_and_log_output(command, FALSE);
    949949        mr_free(command);
     
    10471047        }
    10481048        if (!semaphore_p()) {
    1049             log_msg(3, "P sem failed (pid=%d)", (int) getpid());
     1049            mr_msg(3, "P sem failed (pid=%d)", (int) getpid());
    10501050            fatal_error("Cannot get semaphore P");
    10511051        }
     
    10641064                 bkpinfo->tmpdir, archiving_set_no);
    10651065        if (!does_file_exist(archiving_filelist_fname)) {
    1066             log_msg(3,
     1066            mr_msg(3,
    10671067                    "%s[%d:%d] - well, I would archive %d, except that it doesn't exist. I'll stop now.",
    10681068                    FORTY_SPACES, getpid(), this_thread_no,
     
    10761076                 archiving_set_no - ARCH_BUFFER_NUM, bkpinfo->zip_suffix);
    10771077        if (does_file_exist(tmp)) {
    1078             log_msg(4, "%s[%d:%d] - waiting for storer",
     1078            mr_msg(4, "%s[%d:%d] - waiting for storer",
    10791079                    FORTY_SPACES, getpid(), this_thread_no);
    10801080            while (does_file_exist(tmp)) {
    10811081                sleep(1);
    10821082            }
    1083             log_msg(4, "[%d] - continuing", getpid());
     1083            mr_msg(4, "[%d] - continuing", getpid());
    10841084        }
    10851085        mr_free(tmp);
    10861086
    1087         log_msg(4, "%s[%d:%d] - EXATing %d...", FORTY_SPACES, getpid(),
     1087        mr_msg(4, "%s[%d:%d] - EXATing %d...", FORTY_SPACES, getpid(),
    10881088                this_thread_no, archiving_set_no);
    10891089        if (g_getfattr) {
     
    11001100        }
    11011101
    1102         log_msg(4, "%s[%d:%d] - archiving %d...", FORTY_SPACES, getpid(),
     1102        mr_msg(4, "%s[%d:%d] - archiving %d...", FORTY_SPACES, getpid(),
    11031103                this_thread_no, archiving_set_no);
    11041104        res = archive_this_fileset(bkpinfo, archiving_filelist_fname,
     
    11291129            fatal_error("Cannot get semaphore V");
    11301130        }
    1131         log_msg(4, "%s[%d:%d] - archived %d OK", FORTY_SPACES, getpid(),
     1131        mr_msg(4, "%s[%d:%d] - archived %d OK", FORTY_SPACES, getpid(),
    11321132                this_thread_no, archiving_set_no);
    11331133        archiving_set_no++;
     
    11421142        fatal_error("Cannot get semaphore V");
    11431143    }
    1144     log_msg(3, "%s[%d:%d] - exiting", FORTY_SPACES, getpid(),
     1144    mr_msg(3, "%s[%d:%d] - exiting", FORTY_SPACES, getpid(),
    11451145            this_thread_no);
    11461146    mr_free(archiving_filelist_fname);
     
    11711171                        "Writing any remaining data to media         ");
    11721172
    1173     log_msg(1, "Closing tape/CD ... ");
     1173    mr_msg(1, "Closing tape/CD ... ");
    11741174    if (IS_THIS_A_STREAMING_BACKUP(bkpinfo->backup_media_type)) {
    11751175        /* write tape/cdstream */
     
    11801180        retval += res;
    11811181        if (res) {
    1182             log_msg(1, "write_final_iso_if_necessary returned an error");
    1183         }
    1184     }
    1185     log_msg(2, "Fork is exiting ... ");
     1182            mr_msg(1, "write_final_iso_if_necessary returned an error");
     1183        }
     1184    }
     1185    mr_msg(2, "Fork is exiting ... ");
    11861186
    11871187    mvaddstr_and_log_it(g_currentY++, 74, "Done.");
     
    12341234    mr_free(g_serial_string);
    12351235    g_serial_string = tmp;
    1236     log_msg(2, "g_serial_string = '%s'", g_serial_string);
     1236    mr_msg(2, "g_serial_string = '%s'", g_serial_string);
    12371237
    12381238    mr_asprintf(&tmpfile, "%s/archives/SERIAL-STRING", bkpinfo->scratchdir);
    12391239    if (write_one_liner_data_file(tmpfile, g_serial_string)) {
    1240         log_msg(1, "%ld: Failed to write serial string", __LINE__);
     1240        mr_msg(1, "%ld: Failed to write serial string", __LINE__);
    12411241    }
    12421242    mr_free(g_serial_string);
     
    12531253            fatal_error("Cannot open backup (streaming) device");
    12541254        }
    1255         log_msg(1, "Backup (stream) opened OK");
     1255        mr_msg(1, "Backup (stream) opened OK");
    12561256        write_data_disks_to_stream(data_disks_file);
    12571257    } else {
    1258         log_msg(1, "Backing up to CD's");
     1258        mr_msg(1, "Backing up to CD's");
    12591259    }
    12601260    mr_free(data_disks_file);
     
    13241324    mr_asprintf(&command, "%s >> %s 2>> %s; rm -f %s", cmd, tempfile,
    13251325             tempfile, tempfile);
    1326     log_msg(3, command);
     1326    mr_msg(3, command);
    13271327    open_evalcall_form(title);
    13281328    if (!(pin = popen(command, "r"))) {
     
    13401340        trackno = get_trackno_from_logfile(tempfile);
    13411341        if (trackno < 0 || trackno > 80) {
    1342             log_msg(1, "Weird track#");
     1342            mr_msg(1, "Weird track#");
    13431343            continue;
    13441344        }
     
    14811481    int misc_counter_that_is_not_important = 0;
    14821482
    1483     log_msg(8, "here");
     1483    mr_msg(8, "here");
    14841484    assert(bkpinfo != NULL);
    14851485    /* BERLIOS: To be removed */
     
    15011501    *p_next_set_to_archive = 0;
    15021502    log_to_screen("Archiving regular files");
    1503     log_msg(5, "Go, Shorty. It's your birthday.");
     1503    mr_msg(5, "Go, Shorty. It's your birthday.");
    15041504    open_progress_form(_("Backing up filesystem"),
    15051505                       _("I am backing up your live filesystem now."),
     
    15081508                       get_last_filelist_number(bkpinfo) + 1);
    15091509
    1510     log_msg(5, "We're gonna party like it's your birthday.");
     1510    mr_msg(5, "We're gonna party like it's your birthday.");
    15111511
    15121512    srand((unsigned int) getpid());
     
    15211521    }                           // initialize semaphore
    15221522    for (noof_threads = 0; noof_threads < ARCH_THREADS; noof_threads++) {
    1523         log_msg(8, "Creating thread #%d", noof_threads);
     1523        mr_msg(8, "Creating thread #%d", noof_threads);
    15241524        (*p_archival_threads_running)++;
    15251525        if ((res =
     
    15311531    }
    15321532
    1533     log_msg(8, "About to enter while() loop");
     1533    mr_msg(8, "About to enter while() loop");
    15341534    while (!done_storing) {
    15351535        if (g_exiting) {
     
    15381538        if (*p_archival_threads_running == 0
    15391539            && *p_last_set_archived == storing_set_no - 1) {
    1540             log_msg(2,
     1540            mr_msg(2,
    15411541                    "No archival threads are running. The last stored set was %d and I'm looking for %d. Take off your make-up; the party's over... :-)",
    15421542                    *p_last_set_archived, storing_set_no);
     
    15721572            }
    15731573
    1574             log_msg(2, "Storing set %d", storing_set_no);
     1574            mr_msg(2, "Storing set %d", storing_set_no);
    15751575            while (!does_file_exist(storing_filelist_fname)
    15761576                   || !does_file_exist(storing_afioball_fname)) {
    1577                 log_msg(2,
     1577                mr_msg(2,
    15781578                        "Warning - either %s or %s doesn't exist yet. I'll pause 5 secs.",
    15791579                        storing_filelist_fname, storing_afioball_fname);
     
    16441644    close_progress_form();
    16451645
    1646     log_msg(2, "Joining background threads to foreground thread");
     1646    mr_msg(2, "Joining background threads to foreground thread");
    16471647    for (i = 0; i < noof_threads; i++) {
    16481648        pthread_join(archival_thread[i], pvp);
    1649         log_msg(3, "Thread %d of %d: closed OK", i + 1, noof_threads);
     1649        mr_msg(3, "Thread %d of %d: closed OK", i + 1, noof_threads);
    16501650    }
    16511651    del_semvalue();
    1652     log_msg(2, "Done.");
     1652    mr_msg(2, "Done.");
    16531653    if (retval) {
    16541654        mr_asprintf(&tmp,
     
    17341734    }
    17351735
    1736     log_msg(2, "make_iso_fs --- scratchdir=%s --- destfile=%s",
     1736    mr_msg(2, "make_iso_fs --- scratchdir=%s --- destfile=%s",
    17371737            bkpinfo->scratchdir, destfile);
    17381738    /* BERLIOS: Do not ignore getcwd result */
     
    17591759
    17601760    if (bkpinfo->call_make_iso != NULL) {
    1761         log_msg(2, "bkpinfo->call_make_iso = %s", bkpinfo->call_make_iso);
     1761        mr_msg(2, "bkpinfo->call_make_iso = %s", bkpinfo->call_make_iso);
    17621762        mr_asprintf(&tmp, "%s/archives/NOT-THE-LAST", bkpinfo->scratchdir);
    17631763        mr_asprintf(&message_to_screen, "Making an ISO (%s #%d)",
     
    18081808                mr_asprintf(&sz_blank_disk, "dvd+rw-format -force %s",
    18091809                         bkpinfo->media_device);
    1810                 log_msg(3, "sz_blank_disk = '%s'", sz_blank_disk);
     1810                mr_msg(3, "sz_blank_disk = '%s'", sz_blank_disk);
    18111811                res = run_external_binary_with_percentage_indicator_NEW
    18121812                    ("Blanking DVD disk", sz_blank_disk);
     
    18621862                 bkpinfo->backup_media_string,
    18631863                 g_current_media_number);
    1864         log_msg(1, message_to_screen);
     1864        mr_msg(1, message_to_screen);
    18651865        mr_asprintf(&result_sz, "Call to mkisofs to make ISO (%s #%d) ",
    18661866                 bkpinfo->backup_media_string,
    18671867                 g_current_media_number);
    18681868        if (bkpinfo->nonbootable_backup) {
    1869             log_msg(1, "Making nonbootable backup");
     1869            mr_msg(1, "Making nonbootable backup");
    18701870// FIXME --- change mkisofs string to MONDO_MKISOFS_NONBOOTABLE and add ' .' at end
    18711871            res = eval_call_to_make_ISO(bkpinfo,
     
    18741874                                        MONDO_LOGFILE, message_to_screen);
    18751875        } else {
    1876             log_msg(1, "Making bootable backup");
     1876            mr_msg(1, "Making bootable backup");
    18771877
    18781878#ifdef __FreeBSD__
     
    18811881
    18821882
    1883             log_msg(1, "make_cd_use_lilo is actually %d",
     1883            mr_msg(1, "make_cd_use_lilo is actually %d",
    18841884                    bkpinfo->make_cd_use_lilo);
    18851885            if (bkpinfo->make_cd_use_lilo) {
    1886                 log_msg(1, "make_cd_use_lilo = TRUE");
     1886                mr_msg(1, "make_cd_use_lilo = TRUE");
    18871887// FIXME --- change mkisofs string to MONDO_MKISOFS_REGULAR_SYSLINUX/LILO depending on bkpinfo->make_cd_usE_lilo
    18881888// and add ' .' at end
    18891889#ifdef __IA64__
    1890                 log_msg(1, "IA64 --> elilo");
     1890                mr_msg(1, "IA64 --> elilo");
    18911891                mr_asprintf(&tmp2,"mkisofs -no-emul-boot -b images/mindi-bootroot.%s.img -c boot.cat -o '_ISO_' -J -r -p MondoRescue -publisher www.mondorescue.org -A Mondo_Rescue_GPL -V _CD#_ .", bkpinfo->mrconf->mindi_ia64_boot_size);
    18921892                res = eval_call_to_make_ISO(bkpinfo,
     
    19001900// and add ' .' at end
    19011901                mr_free(tmp2);
    1902                 log_msg(1, "Non-ia64 --> lilo");
     1902                mr_msg(1, "Non-ia64 --> lilo");
    19031903                res = eval_call_to_make_ISO(bkpinfo,
    19041904                                            "mkisofs -b images/mindi-bootroot.2880.img -c boot.cat -o '_ISO_' -J -r -p MondoRescue -publisher www.mondorescue.org -A Mondo_Rescue_GPL -V _CD#_ .",
     
    19091909#endif
    19101910            } else {
    1911                 log_msg(1, "make_cd_use_lilo = FALSE");
    1912                 log_msg(1, "Isolinux");
     1911                mr_msg(1, "make_cd_use_lilo = FALSE");
     1912                mr_msg(1, "Isolinux");
    19131913                res = eval_call_to_make_ISO(bkpinfo,
    19141914                                            "mkisofs -no-emul-boot -b isolinux.bin -boot-load-size 4 -boot-info-table -c boot.cat -o '_ISO_' -J -r -p MondoRescue -publisher www.mondorescue.org -A Mondo_Rescue_GPL -V _CD#_ .",
     
    19321932        || bkpinfo->backup_media_type == cdrw) {
    19331933        if (is_this_device_mounted(bkpinfo->media_device)) {
    1934             log_msg(2,
     1934            mr_msg(2,
    19351935                    "Warning - %s mounted. I'm unmounting it before I burn to it.",
    19361936                    bkpinfo->media_device);
     
    19421942
    19431943    if (bkpinfo->call_burn_iso != NULL) {
    1944         log_msg(2, "bkpinfo->call_burn_iso = %s", bkpinfo->call_burn_iso);
     1944        mr_msg(2, "bkpinfo->call_burn_iso = %s", bkpinfo->call_burn_iso);
    19451945        mr_asprintf(&message_to_screen, "Burning %s #%d",
    19461946                 bkpinfo->backup_media_string,
     
    19771977    chdir(old_pwd);
    19781978    if (retval) {
    1979         log_msg(1, "WARNING - make_iso_fs returned an error");
     1979        mr_msg(1, "WARNING - make_iso_fs returned an error");
    19801980    }
    19811981    mr_free(old_pwd);
     
    19921992             "dd if=%s bs=512 count=1 2> /dev/null | strings | head -n1",
    19931993             bigfile_fname);
    1994     log_msg(1, "command = '%s'", command);
     1994    mr_msg(1, "command = '%s'", command);
    19951995    tmp = call_program_and_get_last_line_of_output(command);
    1996     log_msg(1, "--> tmp = '%s'", tmp);
     1996    mr_msg(1, "--> tmp = '%s'", tmp);
    19971997    mr_free(command);
    19981998    if (strstr(tmp, "NTFS")) {
     
    20552055        size_of_all_biggiefiles_K(bkpinfo) / bkpinfo->optimal_set_size + 1;
    20562056
    2057     log_msg(1, "size of all biggiefiles = %ld",
     2057    mr_msg(1, "size of all biggiefiles = %ld",
    20582058            size_of_all_biggiefiles_K(bkpinfo));
    2059     log_msg(1, "estimated_total_noof_slices = %ld KB / %ld KB = %ld",
     2059    mr_msg(1, "estimated_total_noof_slices = %ld KB / %ld KB = %ld",
    20602060            size_of_all_biggiefiles_K(bkpinfo), bkpinfo->optimal_set_size,
    20612061            estimated_total_noof_slices);
    20622062
    20632063    if (length_of_file(biggielist_fname) < 6) {
    2064         log_msg(1, "No biggiefiles; fair enough...");
     2064        mr_msg(1, "No biggiefiles; fair enough...");
    20652065        return (0);
    20662066    }
     
    20952095            // Call ntfsclone (formerly partimagehack) if it's a /dev entry
    20962096            // (i.e. a partition to be imaged)
    2097             log_msg(2, "bigfile_fname = %s", bigfile_fname);
     2097            mr_msg(2, "bigfile_fname = %s", bigfile_fname);
    20982098            use_ntfsprog = FALSE;
    20992099            if (!strncmp(bigfile_fname, "/dev/", 5)
    21002100                && is_dev_an_NTFS_dev(bigfile_fname)) {
    21012101                use_ntfsprog = TRUE;
    2102                 log_msg(2,
     2102                mr_msg(2,
    21032103                        "Calling ntfsclone in background because %s is an NTFS partition",
    21042104                        bigfile_fname);
     
    21132113                    fatal_error("Fork failure");
    21142114                case 0:
    2115                     log_msg(2,
     2115                    mr_msg(2,
    21162116                            "CHILD - fip - calling feed_into_ntfsprog(%s, %s)",
    21172117                            bigfile_fname, sz_devfile);
     
    21202120                    break;
    21212121                default:
    2122                     log_msg(2,
     2122                    mr_msg(2,
    21232123                            "feed_into_ntfsprog() called in background --- pid=%ld",
    21242124                            (long int) (pid));
     
    21332133
    21342134            // Whether partition or biggiefile, just do your thang :-)
    2135             log_msg(2, "Bigfile #%ld is '%s' (%ld KB)",
     2135            mr_msg(2, "Bigfile #%ld is '%s' (%ld KB)",
    21362136                    biggie_file_number + 1, bigfile_fname,
    21372137                    (long) biggie_fsize >> 10);
     
    21802180    paranoid_fclose(fin);
    21812181
    2182     log_msg(1, "Finished backing up bigfiles");
    2183     log_msg(1, "estimated slices = %ld; actual slices = %ld",
     2182    mr_msg(1, "Finished backing up bigfiles");
     2183    mr_msg(1, "estimated slices = %ld; actual slices = %ld",
    21842184            estimated_total_noof_slices, g_current_progress);
    21852185    close_progress_form();
     
    22292229                 bkpinfo->tmpdir, curr_set_no, bkpinfo->zip_suffix);
    22302230
    2231         log_msg(1, "EXAT'g set %ld", curr_set_no);
     2231        mr_msg(1, "EXAT'g set %ld", curr_set_no);
    22322232        if (g_getfattr) {
    22332233            mr_asprintf(&curr_xattr_list_fname, XATTR_LIST_FNAME_RAW_SZ,
     
    22412241        }
    22422242
    2243         log_msg(1, "Archiving set %ld", curr_set_no);
     2243        mr_msg(1, "Archiving set %ld", curr_set_no);
    22442244        res = archive_this_fileset(bkpinfo, curr_filelist_fname,
    22452245                                   curr_afioball_fname, curr_set_no);
     
    23492349                                     BLK_START_AFIOBALLS);
    23502350#if __FreeBSD__ == 5
    2351         log_msg(1,
     2351        mr_msg(1,
    23522352                "Using single-threaded make_afioballs_and_images() to suit b0rken FreeBSD 5.0");
    23532353        res = make_afioballs_and_images_OLD(bkpinfo);
     
    23642364    if (res) {
    23652365        mvaddstr_and_log_it(g_currentY++, 74, "Errors.");
    2366         log_msg(1, "make_afioballs_and_images returned an error");
     2366        mr_msg(1, "make_afioballs_and_images returned an error");
    23672367    } else {
    23682368        mvaddstr_and_log_it(g_currentY++, 74, "Done.");
     
    24132413
    24142414    mr_asprintf(&blah, "biggielist = %s", biggielist);
    2415     log_msg(2, blah);
     2415    mr_msg(2, blah);
    24162416    mr_free(blah);
    24172417
    24182418    if (!does_file_exist(biggielist)) {
    2419         log_msg(1, "BTW, the biggielist does not exist");
     2419        mr_msg(1, "BTW, the biggielist does not exist");
    24202420    }
    24212421
     
    24572457    retval += res;
    24582458    if (res) {
    2459         log_msg(1, "make_slices_and_images returned an error");
     2459        mr_msg(1, "make_slices_and_images returned an error");
    24602460        mvaddstr_and_log_it(g_currentY++, 74, "Errors.");
    24612461    } else {
     
    25192519        mr_asprintf(&curr_file, "%s", cf);
    25202520        if (!does_file_exist(curr_file)) {
    2521             log_msg(1,
     2521            mr_msg(1,
    25222522                    "Warning - you're trying to add a non-existent file - '%s' to the CD",
    25232523                    curr_file);
    25242524        } else {
    2525             log_msg(8, "Trying to add file %s to CD", curr_file);
     2525            mr_msg(8, "Trying to add file %s to CD", curr_file);
    25262526            would_occupy += length_of_file(curr_file) / 1024;
    25272527        }
     
    25382538        retval += res;
    25392539        if (res) {
    2540             log_msg(1, "WARNING - write_iso_and_go_on returned an error");
     2540            mr_msg(1, "WARNING - write_iso_and_go_on returned an error");
    25412541        }
    25422542    }
     
    25542554        retval += res;
    25552555        if (res) {
    2556             log_msg(1, "(move_files_to_cd) '%s' failed", tmp);
     2556            mr_msg(1, "(move_files_to_cd) '%s' failed", tmp);
    25572557        } else {
    2558             log_msg(8, "Moved %s to CD OK", tmp);
     2558            mr_msg(8, "Moved %s to CD OK", tmp);
    25592559        }
    25602560        mr_free(tmp);
     
    25652565
    25662566    if (retval) {
    2567         log_msg(1,
     2567        mr_msg(1,
    25682568                "Warning - errors occurred while I was adding files to CD dir");
    25692569    }
     
    26212621        mr_asprintf(&bootdisk_dev, "/dev/fd0H1722");
    26222622    } else {
    2623         log_msg(1, "Warning - can't find a 1.72MB floppy device *sigh*");
     2623        mr_msg(1, "Warning - can't find a 1.72MB floppy device *sigh*");
    26242624        mr_asprintf(&bootdisk_dev, DEFAULT_1722MB_DISK);
    26252625    }
    26262626    mr_asprintf(&datadisk_dev, "%s", "/dev/fd0");
    26272627    if (!does_device_exist(datadisk_dev)) {
    2628         log_msg(1, "Warning - can't find a 1.44MB floppy device *sigh*");
     2628        mr_msg(1, "Warning - can't find a 1.44MB floppy device *sigh*");
    26292629        mr_free(datadisk_dev);
    26302630        mr_asprintf(&datadisk_dev, "%s", "/dev/fd0");
     
    26862686                }
    26872687                mr_asprintf(&tmp, "cat %s > %s", rootdisk_file, datadisk_dev);
    2688                 log_msg(1, "tmp = '%s'", tmp);
     2688                mr_msg(1, "tmp = '%s'", tmp);
    26892689                res +=
    26902690                    run_external_binary_with_percentage_indicator_NEW
     
    27072707    for (i = 1; i < 99; i++) {
    27082708        mr_asprintf(&tmp, "%s/mindi-data-%d.img", imagesdir, i);
    2709         log_msg(3, tmp);
     2709        mr_msg(3, tmp);
    27102710        if (!does_file_exist(tmp)) {
    2711             log_msg(3, "...not found");
     2711            mr_msg(3, "...not found");
    27122712            break;
    27132713        }
     
    28302830        mr_asprintf(&curr_file, "%s", cf);
    28312831        if (!does_file_exist(curr_file)) {
    2832             log_msg(1,
     2832            mr_msg(1,
    28332833                    "Warning - you're trying to add a non-existent file - '%s' to the tape",
    28342834                    curr_file);
     
    28582858
    28592859    if (retval) {
    2860         log_msg(1,
     2860        mr_msg(1,
    28612861                "Warning - errors occurred while I was adding file to tape");
    28622862    }
     
    28902890        } else {
    28912891            mr_asprintf(&cdrecord, " ");
    2892             log_msg(2, "Found no cdrecord nor dvdrecord in path.");
     2892            mr_msg(2, "Found no cdrecord nor dvdrecord in path.");
    28932893        }
    28942894        if (cdrecord[0]) {
     
    29442944    if (cdrom_dev != NULL) {
    29452945/* When enabled, it made CD eject-and-retract when wrong CD inserted.. Weird
    2946       log_msg(2, "paafcd: Retracting CD-ROM drive if possible" );
     2946      mr_msg(2, "paafcd: Retracting CD-ROM drive if possible" );
    29472947      retract_CD_tray_and_defeat_autorun();
    29482948*/
     
    29572957        if ((attempt_to_mount_returned_this =
    29582958             run_program_and_log_output(tmp, 1))) {
    2959             log_msg(4, "Failed to mount %s at %s", cdrom_dev, mtpt);
     2959            mr_msg(4, "Failed to mount %s at %s", cdrom_dev, mtpt);
    29602960            log_to_screen("If there's a CD/DVD in the drive, it's blank.");
    29612961            mr_asprintf(&our_serial_str, "%s", "");
     
    29842984        mr_free(szunmount);
    29852985
    2986         log_msg(2, "paafcd: cd_number = %d", cd_number);
    2987         log_msg(2, "our serial str = %s; g_serial_string = %s",
     2986        mr_msg(2, "paafcd: cd_number = %d", cd_number);
     2987        mr_msg(2, "our serial str = %s; g_serial_string = %s",
    29882988                our_serial_str, g_serial_string);
    29892989        if (cd_number > 0 && !strcmp(our_serial_str, g_serial_string)) {
    2990             log_msg(2, "This %s is part of this backup set!",
     2990            mr_msg(2, "This %s is part of this backup set!",
    29912991                    g_backup_media_string);
    29922992            ok_go_ahead_burn_it = FALSE;
     
    30053005        mr_free(our_serial_str);
    30063006    } else {
    3007         log_msg(2,
     3007        mr_msg(2,
    30083008                "paafcd: Can't find CD-ROM drive. Perhaps it has a blank %s in it?",
    30093009                g_backup_media_string);
     
    30283028        goto gotos_make_me_puke;
    30293029    } else {
    3030         log_msg(2, "paafcd: OK, going ahead and burning it.");
     3030        mr_msg(2, "paafcd: OK, going ahead and burning it.");
    30313031    }
    30323032    mr_free(cdrom_dev);
    30333033
    3034     log_msg(2,
     3034    mr_msg(2,
    30353035            "paafcd: OK, I assume I have a blank/reusable %s in the drive...",
    30363036            g_backup_media_string);
     
    31613161        file_to_openin = ntfsprog_fifo;
    31623162        mr_asprintf(&checksum_line, "IGNORE");
    3163         log_msg(2,
     3163        mr_msg(2,
    31643164                "Not calculating checksum for %s: it would take too long",
    31653165                biggie_filename);
     
    32213221    paranoid_fclose(fout);
    32223222    length = totallength / optimal_set_size / 1024;
    3223     log_msg(1, "Opening in %s; slicing it and writing to CD/tape",
     3223    mr_msg(1, "Opening in %s; slicing it and writing to CD/tape",
    32243224            file_to_openin);
    32253225    if (!(fin = fopen(file_to_openin, "r"))) {
     
    32793279        {
    32803280            if (!does_file_exist(curr_slice_fname_uncompressed)) {
    3281                 log_msg(2,
     3281                mr_msg(2,
    32823282                        "Warning - '%s' doesn't exist. How can I compress slice?",
    32833283                        curr_slice_fname_uncompressed);
     
    32873287                         bkpinfo->compression_level,
    32883288                         curr_slice_fname_uncompressed);
    3289                 log_msg(2, command);
     3289                mr_msg(2, command);
    32903290                if ((res = system(command))) {
    32913291                    log_OS_error(command);
     
    33033303            retval += res;
    33043304            if (res) {
    3305                 log_msg(2, "Failed to compress the slice");
     3305                mr_msg(2, "Failed to compress the slice");
    33063306            }
    33073307            if (bkpinfo->use_lzo
     
    33233323                newtRefresh();
    33243324            } else {
    3325                 log_msg(2, tmp);
     3325                mr_msg(2, tmp);
    33263326            }
    33273327#else
    3328             log_msg(2, tmp);
     3328            mr_msg(2, tmp);
    33293329#endif
    33303330            mr_free(tmp);
     
    33733373                 biggie_file_number + 1);
    33743374    }
    3375     log_msg(1, tmp);
     3375    mr_msg(1, tmp);
    33763376    mr_free(tmp);
    33773377    return (retval);
     
    34213421    mr_free(tmp);
    34223422
    3423     log_msg(1, "Wiped %s's archives", dir);
     3423    mr_msg(1, "Wiped %s's archives", dir);
    34243424    mr_asprintf(&tmp, "ls -l %s", dir);
    34253425    run_program_and_log_output(tmp, FALSE);
     
    34573457
    34583458    mr_asprintf(&tmp, "Writing the final ISO");
    3459     log_msg(2, tmp);
     3459    mr_msg(2, tmp);
    34603460    /* BERLIOS: center_string is now broken
    34613461       center_string(tmp, 80);
     
    34733473    }
    34743474#endif
    3475     log_msg(2, "Returning from writing final ISO (res=%d)", res);
     3475    mr_msg(2, "Returning from writing final ISO (res=%d)", res);
    34763476    return (res);
    34773477}
     
    35253525        using_nfs = FALSE;
    35263526    }
    3527     log_msg(1, "OK, time to make %s #%d",
     3527    mr_msg(1, "OK, time to make %s #%d",
    35283528            bkpinfo->backup_media_string,
    35293529            g_current_media_number);
     
    35413541             bkpinfo->scratchdir);
    35423542    if (run_program_and_log_output(tmp, FALSE)) {
    3543         log_msg(2, "Warning - unable to copy autorun to scratchdir");
     3543        mr_msg(2, "Warning - unable to copy autorun to scratchdir");
    35443544    }
    35453545    mr_free(tmp);
     
    35503550    if (last_cd) {
    35513551        unlink(lastcd_fname);
    3552         log_msg(2,
     3552        mr_msg(2,
    35533553                "OK, you're telling me this is the last CD. Fair enough.");
    35543554    } else {
     
    35793579            if ((tmp = find_cdrom_device(FALSE)) == NULL)   // make sure find_cdrom_device() finds, records CD-R's loc
    35803580            {
    3581                 log_msg(3, "*Sigh* Mike, I hate your computer.");
     3581                mr_msg(3, "*Sigh* Mike, I hate your computer.");
    35823582                bkpinfo->manual_cd_tray = TRUE;
    35833583            }                   // if it can't be found then force pausing
    35843584            else {
    3585                 log_msg(3, "Great. Found Mike's CD-ROM drive.");
     3585                mr_msg(3, "Great. Found Mike's CD-ROM drive.");
    35863586                mr_free(tmp);
    35873587            }
     
    36113611                }
    36123612            } else {
    3613                 log_msg(2, "Retrying, at user's request...");
     3613                mr_msg(2, "Retrying, at user's request...");
    36143614                res = 0;
    36153615            }
     
    36343634             bkpinfo->scratchdir, bkpinfo->scratchdir);
    36353635    if (system(tmp)) {
    3636         log_msg(2,
     3636        mr_msg(2,
    36373637                "Error occurred when I tried to delete the redundant IMGs and GZs");
    36383638    }
     
    36403640
    36413641    if (last_cd) {
    3642         log_msg(2, "This was your last CD.");
    3643     } else {
    3644         log_msg(2, "Continuing to backup your data...");
     3642        mr_msg(2, "This was your last CD.");
     3643    } else {
     3644        mr_msg(2, "Continuing to backup your data...");
    36453645    }
    36463646
     
    36823682        //bkpinfo->backup_media_type == cdrw || bkpinfo->backup_media_type == cdr))
    36833683    {
    3684         log_msg(2,
     3684        mr_msg(2,
    36853685                "Not verifying again. Per-CD/ISO verification already carried out.");
    36863686        paranoid_system
     
    36943694        for (cdno = 1; cdno < 99 && bkpinfo->verify_data; cdno++) {
    36953695            if (cdno != g_current_media_number) {
    3696                 log_msg(2,
     3696                mr_msg(2,
    36973697                        "Warning - had to change g_current_media_number from %d to %d",
    36983698                        g_current_media_number, cdno);
     
    37873787    }
    37883788    mr_asprintf(&tmp, "maxblocks = %d; p=%s", maxblocks, p);
    3789     log_msg(2, tmp);
     3789    mr_msg(2, tmp);
    37903790    mr_free(tmp);
    37913791
     
    38033803        if (fread(blk, 1, 1024, fin) != 1024) {
    38043804            if (feof(fin)) {
    3805                 log_msg(1,
     3805                mr_msg(1,
    38063806                        "img read err - img ended prematurely - non-fatal error");
    38073807                sleep(3);
Note: See TracChangeset for help on using the changeset viewer.