Ignore:
Timestamp:
Sep 9, 2007, 1:00:49 AM (17 years ago)
Author:
Bruno Cornec
Message:

remove g_loglevel and replaced with mr_conf->log_level

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/stable/mondo/src/mondorestore/mondorestore.c

    r1621 r1625  
    3232#include "mondo-rstr-tools-EXT.h"
    3333
     34#define DEFAULT_MR_LOGLEVEL 4
     35
    3436extern void twenty_seconds_til_yikes(void);
     37extern struct mr_ar_conf *mr_conf = NULL;
    3538
    3639
     
    10131016    struct s_node *node = NULL;
    10141017
    1015     old_loglevel = g_loglevel;
     1018    old_loglevel = mr_conf->log_level;
    10161019    ubuf = &the_utime_buf;
    10171020    assert(bkpinfo != NULL);
     
    10761079    if (biggiestruct.use_ntfsprog)  // if it's an NTFS device
    10771080    {
    1078         g_loglevel = 4;
     1081        mr_conf->log_level = 4;
    10791082        use_ntfsprog_hack = TRUE;
    10801083        mr_msg(2,
     
    12411244    }
    12421245    paranoid_fclose(fout);
    1243     g_loglevel = old_loglevel;
     1246    mr_conf->log_level = old_loglevel;
    12441247
    12451248    if (use_ntfsprog_hack) {
     
    13171320    ubuf = &the_utime_buf;
    13181321
    1319     old_loglevel = g_loglevel;
     1322    old_loglevel = mr_conf->log_level;
    13201323    assert(bkpinfo != NULL);
    13211324    assert(orig_bf_fname != NULL);
     
    13651368
    13661369    if (use_ntfsprog) {
    1367         g_loglevel = 4;
     1370        mr_conf->log_level = 4;
    13681371        mr_asprintf(&outfile_fname, orig_bf_fname);
    13691372        use_ntfsprog_hack = TRUE;
     
    15071510    }
    15081511
    1509     g_loglevel = old_loglevel;
     1512    mr_conf->log_level = old_loglevel;
    15101513    return (retval);
    15111514}
     
    28172820    }
    28182821
    2819     g_loglevel = DEFAULT_MR_LOGLEVEL;
     2822    mr_conf->log_level = DEFAULT_MR_LOGLEVEL;
    28202823
    28212824/* Configure global variables */
     
    29262929    }
    29272930
    2928     g_loglevel = DEFAULT_MR_LOGLEVEL;
     2931    mr_conf->log_level = DEFAULT_MR_LOGLEVEL;
    29292932    if (argc == 3 && strcmp(argv[1], "--echo-to-screen") == 0) {
    29302933        fout = fopen("/tmp/out.txt", "w");
     
    29582961
    29592962    if (argc == 5 && strcmp(argv[1], "--common") == 0) {
    2960         g_loglevel = 6;
     2963        mr_conf->log_level = 6;
    29612964        filelist = load_filelist(argv[2]);
    29622965        if (!filelist) {
     
    29862989    if (argc == 5 && strcmp(argv[1], "--copy") == 0) {
    29872990        mr_msg(1, "SCORE");
    2988         g_loglevel = 10;
     2991        mr_conf->log_level = 10;
    29892992        if (strstr(argv[2], "save")) {
    29902993            mr_msg(1, "Saving from %s to %s", argv[3], argv[4]);
Note: See TracChangeset for help on using the changeset viewer.