Changeset 1086 in MondoRescue for trunk/mondo/src/common/libmondo-stream.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-stream.c

    r1081 r1086  
    363363            wrong_marker(BLK_STOP_EXAT_FILE, *pctrl_chr);
    364364        }
    365         log_msg(1, "Got xattr");
     365        mr_msg(1, "Got xattr");
    366366    }
    367367    mr_free(fname);
     
    390390            wrong_marker(BLK_STOP_EXTENDED_ATTRIBUTES, *pctrl_chr);
    391391        }
    392         log_msg(1, "Got acl");
     392        mr_msg(1, "Got acl");
    393393    }
    394394    mr_free(fname);
     
    408408    // tarball itself
    409409    res = read_header_block_from_stream(ptmp_size, tmp_fname, pctrl_chr);
    410     log_msg(1, "now looking for afioball");
     410    mr_msg(1, "now looking for afioball");
    411411    return (retval);
    412412}
     
    580580
    581581    if (strncmp(tapedev, "/dev/", 5)) {
    582         log_msg(1,
     582        mr_msg(1,
    583583                "Not using 'mt setblk'. This isn't an actual /dev entry.");
    584584        return (0);
     
    910910//    crctt=crc16=0;
    911911            where_I_was_before_tape_change = size;
    912             log_msg(4, "where_I_was_... = %lld",
     912            mr_msg(4, "where_I_was_... = %lld",
    913913                    where_I_was_before_tape_change);
    914914            start_to_read_from_next_tape(bkpinfo);
    915             log_msg(4, "Started reading from next tape.");
     915            mr_msg(4, "Started reading from next tape.");
    916916            skip_incoming_files_until_we_find_this_one(temp_fname);
    917             log_msg(4, "Skipped irrelevant files OK.");
     917            mr_msg(4, "Skipped irrelevant files OK.");
    918918            for (size = orig_size; size > where_I_was_before_tape_change;
    919919                 size -= bytes_to_write) {
     
    921921                    fread(datablock, 1, bytes_to_read, g_tape_stream);
    922922            }
    923             log_msg(4, "'size' is now %lld (should be %lld)", size,
     923            mr_msg(4, "'size' is now %lld (should be %lld)", size,
    924924                    where_I_was_before_tape_change);
    925925            log_to_screen("Successfully re-sync'd tape");
     
    938938#endif
    939939    }
    940     log_msg(6, "Total read from tape for this file = %lld",
     940    mr_msg(6, "Total read from tape for this file = %lld",
    941941            total_read_from_tape_for_this_file);
    942     log_msg(6, ".......................... Should be %lld", orig_size);
     942    mr_msg(6, ".......................... Should be %lld", orig_size);
    943943    g_tape_posK += total_read_from_tape_for_this_file / 1024;
    944944    mr_asprintf(&actual_cksum, "%04x%04x", crc16, crctt);
     
    10271027    }
    10281028    tempblock[i] = '\0';
    1029     log_msg(6, "%s (fname=%s, size=%ld K)",
     1029    mr_msg(6, "%s (fname=%s, size=%ld K)",
    10301030            marker_to_string(*pcontrol_char), tempblock + 1000,
    10311031            (long) (*plen) >> 10);
     
    11411141        pB = the_file_I_was_reading;
    11421142    }
    1143     log_msg(1, "skip_incoming_..(%s)", pB);
    1144     log_msg(2, "Looking for initial START_AN_AFIO_OR_SLICE");
     1143    mr_msg(1, "skip_incoming_..(%s)", pB);
     1144    mr_msg(2, "Looking for initial START_AN_AFIO_OR_SLICE");
    11451145    ctrl_chr = -1;
    11461146    while (ctrl_chr != BLK_START_AN_AFIO_OR_SLICE) {
     
    11511151            break;
    11521152        }
    1153         log_msg(1, "%lld %s %c", temp_size, temp_fname, ctrl_chr);
     1153        mr_msg(1, "%lld %s %c", temp_size, temp_fname, ctrl_chr);
    11541154        wrong_marker(BLK_START_AN_AFIO_OR_SLICE, ctrl_chr);
    1155         log_msg(3, "Still trying to re-sync w/ tape");
     1155        mr_msg(3, "Still trying to re-sync w/ tape");
    11561156        mr_free(temp_fname);
    11571157        temp_fname = (char *)&res;
     
    11641164            break;
    11651165        }
    1166         log_msg(1, "%lld %s %c", temp_size, temp_fname, ctrl_chr);
     1166        mr_msg(1, "%lld %s %c", temp_size, temp_fname, ctrl_chr);
    11671167        wrong_marker(BLK_START_FILE, ctrl_chr);
    1168         log_msg(3, "Still trying to re-sync w/ tape");
     1168        mr_msg(3, "Still trying to re-sync w/ tape");
    11691169        /* Do not desallocate when the while condition is met */
    11701170        if (ctrl_chr != BLK_START_FILE) {
     
    11861186    }
    11871187    while (strcmp(pA, pB)) {
    1188         log_msg(6, "Skipping %s (it's not %s)", temp_fname,
     1188        mr_msg(6, "Skipping %s (it's not %s)", temp_fname,
    11891189                the_file_I_was_reading);
    11901190        for (size = temp_size; size > 0; size -= bytes_to_write) {
     
    12301230         */
    12311231    }
    1232     log_msg(2, "Reading %s (it matches %s)", temp_fname,
     1232    mr_msg(2, "Reading %s (it matches %s)", temp_fname,
    12331233            the_file_I_was_reading);
    12341234    mr_free(temp_fname);
     
    12751275        wrong_marker(BLK_START_OF_BACKUP, ctrlchr);
    12761276    } else {
    1277         log_msg(3, "Next tape opened OK. Whoopee!");
     1277        mr_msg(3, "Next tape opened OK. Whoopee!");
    12781278    }
    12791279    return (res);
     
    13501350    char *fname;
    13511351
    1352     log_msg(2, "I am now writing back catalog to tape");
     1352    mr_msg(2, "I am now writing back catalog to tape");
    13531353    last = g_tapecatalog->entries - 1;
    13541354    for (i = 0; i <= last; i++) {
     
    13561356                 g_tapecatalog->el[i].fname);
    13571357        if (!does_file_exist(fname)) {
    1358             log_msg(6, "Can't write %s - it doesn't exist.", fname);
     1358            mr_msg(6, "Can't write %s - it doesn't exist.", fname);
    13591359        } else {
    13601360            write_header_block_to_stream(length_of_file(fname),
    13611361                                         "start-backcatalog-afio-or-slice",
    13621362                                         BLK_START_AN_AFIO_OR_SLICE);
    1363             log_msg(2, "Writing %s", fname);
     1363            mr_msg(2, "Writing %s", fname);
    13641364            if (write_file_to_stream_from_file(bkpinfo, fname)) {
    13651365                res++;
    1366                 log_msg(2, "%s failed", fname);
     1366                mr_msg(2, "%s failed", fname);
    13671367            }
    13681368            if (i != last) {
     
    13741374        mr_free(fname);
    13751375    }
    1376     log_msg(2, "Finished writing back catalog to tape");
     1376    mr_msg(2, "Finished writing back catalog to tape");
    13771377    return (res);
    13781378}
     
    16061606             marker_to_string(control_char), p,
    16071607             (long) length_of_incoming_file >> 10);
    1608     log_msg(6, tmp);
     1608    mr_msg(6, tmp);
    16091609    mr_free(tmp);
    16101610    return (0);
Note: See TracChangeset for help on using the changeset viewer.