Changeset 3380


Ignore:
Timestamp:
May 6, 2015, 11:57:35 PM (4 years ago)
Author:
bruno
Message:
  • Do not use a \n with log_msg (ease debug with 99)
Location:
branches/3.2/mondo/src
Files:
9 edited

Legend:

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

    r3379 r3380  
    28482848    fout = fopen(tmp, "w");
    28492849    if (fout == NULL) {
    2850         log_msg(1, "Unable to open and write to %s\n", tmp);
     2850        log_msg(1, "Unable to open and write to %s", tmp);
    28512851        mr_free(tmp);
    28522852        mr_free(suffix);
  • branches/3.2/mondo/src/common/libmondo-cli.c

    r3379 r3380  
    121121    log_msg(3, "media_size = %ld", bkpinfo->media_size);
    122122    if (bkpinfo->media_size <= 0) {
    123         log_msg(1, "You gave media an invalid size %s\n", value);
     123        log_msg(1, "You gave media an invalid size %s", value);
    124124        return (-1);
    125125    }
     
    999999void help_screen()
    10001000{
    1001     log_msg(1, "Type 'man mondoarchive' for more information\n");
     1001    log_msg(1, "Type 'man mondoarchive' for more information");
    10021002    exit(1);
    10031003}
  • branches/3.2/mondo/src/common/libmondo-devices.c

    r3379 r3380  
    135135
    136136    mr_asprintf(tmp, "%s", where_is_root_mounted());
    137     log_msg(0, "root is mounted at %s\n", tmp);
     137    log_msg(0, "root is mounted at %s", tmp);
    138138    log_msg(0, "That doesn't mean %s is the root partition. It's just a debugging message. Relax. It's part of am_I_in_disaster_recovery_mode().", tmp);
    139139
     
    28802880
    28812881    mr_asprintf(exclude_these_directories,"%s", call_program_and_get_last_line_of_output("mount -t coda,ncpfs,fuse.sshfs,nfs,nfs4,vmhgfs,smbfs,cifs,afs,gfs,ocfs,ocfs2,mvfs,nsspool,nssvol | tr -s '\t' ' ' | cut -d' ' -f3 | tr -s '\n' '|' | awk '{print $0;}'"));
    2882     log_msg(9,"list_of_NETFS_mounts_only returns %s\n",exclude_these_directories);
     2882    log_msg(9,"list_of_NETFS_mounts_only returns %s",exclude_these_directories);
    28832883    return(exclude_these_directories);
    28842884}
  • branches/3.2/mondo/src/common/libmondo-filelist.c

    r3292 r3380  
    276276        }
    277277        if (siz > g_max_biggie_size) {
    278             log_msg(10, "Adding %s to big files (size = %ld)\n", incoming, siz);
     278            log_msg(10, "Adding %s to big files (size = %ld)", incoming, siz);
    279279            fprintf(fbig, "%s\n", incoming);
    280280        } else {
    281281            curr_set_size += siz;
    282             log_msg(10, "Adding %s to filelist %d (size = %ld)\n", incoming, curr_set_no, siz);
     282            log_msg(10, "Adding %s to filelist %d (size = %ld)", incoming, curr_set_no, siz);
    283283            fprintf(fout, "%s\n", incoming);
    284284            if (curr_set_size > maxsetsizeK) {
     
    462462        mr_asprintf(syscall, "%s '%s' 2>> /dev/null", syscall_sprintf, tmp);    // " MONDO_LOGFILE);
    463463        mr_free(tmp);
    464         log_msg(20,"calling %s\n",syscall);
     464        log_msg(20,"calling %s",syscall);
    465465        call_exe_and_pipe_output_to_fd(syscall, pout);
    466466        mr_free(syscall);
     
    608608
    609609        i = strcmp(p, q);
    610         log_msg(my_depth, "'%s' v '%s' --> %d\n", p, q, i);
     610        log_msg(my_depth, "'%s' v '%s' --> %d", p, q, i);
    611611
    612612//      printf("%s v %s --> %d\n", p, q, i);
    613613
    614614        if (i < 0) {            // read another subset file in.
    615             log_msg(my_depth, "Reading next subset line in\n\n");
     615            log_msg(my_depth, "Reading next subset line in");
    616616            mr_free(current_subset_file);
    617617            mr_getline(current_subset_file, faclin);
     
    947947
    948948    if (!node->ch) {
    949         log_msg(0, "%s\n", current_string);
     949        log_msg(0, "%s", current_string);
    950950    }
    951951
  • branches/3.2/mondo/src/common/libmondo-raid.c

    r3191 r3380  
    712712            raidrec->parity = 3;
    713713        } else {
    714             log_msg(1, "Unknown RAID parity algorithm '%s'\n.", value);
     714            log_msg(1, "Unknown RAID parity algorithm '%s'", value);
    715715        }
    716716        log_msg(4,"Found raid parity %d",raidrec->parity);
     
    976976// open file
    977977if (!(fin = fopen(mdstat_fname, "r"))) {
    978     log_msg(1, "Could not open %s.\n", mdstat_fname);
     978    log_msg(1, "Could not open %s.", mdstat_fname);
    979979    return 1;
    980980}
     
    989989while ( !feof_unlocked(fin) ) {
    990990    res = getline(&string, &len, fin);
    991     log_msg(8, "mdstat line '%s' read.\n", string);
     991    log_msg(8, "mdstat line '%s' read.", string);
    992992    if (res <= 0) break;
    993993    // trim spaces
    994994    strip_spaces(string);
    995     log_msg(8, "mdstat line 2 '%s' read.\n", string);
     995    log_msg(8, "mdstat line 2 '%s' read.", string);
    996996    // if we have newline after only spaces, this is a blank line, update
    997997    // counters, otherwise do normal parsing
     
    10041004        case 1:  // device information
    10051005            // check whether last line of record and if so skip
    1006             log_msg(8, "This is the device line\n");
     1006            log_msg(8, "This is the device line");
    10071007            pos = strcasestr(string, "unused devices: ");
    10081008            if (pos != NULL) {
     
    10501050            }
    10511051            if (!strcmp(token, "inactive")) {
    1052                 log_msg(1, "RAID device '%s' inactive.\n", raidlist->el[raidlist->entries].raid_device);
     1052                log_msg(1, "RAID device '%s' inactive.", raidlist->el[raidlist->entries].raid_device);
    10531053                mr_free(string);
    10541054                mr_free(token);
     
    10891089                raidlist->el[raidlist->entries].raid_level = 10;
    10901090            } else {
    1091                 log_msg(1, "Unknown RAID level '%s'.\n", token);
     1091                log_msg(1, "Unknown RAID level '%s'", token);
    10921092                mr_free(string);
    10931093                mr_free(token);
     
    11331133                    break;
    11341134                default: // error
    1135                     log_msg(1, "Unknown device type '%c'\n", type);
     1135                    log_msg(1, "Unknown device type '%c'", type);
    11361136                    mr_free(string);
    11371137                    mr_free(token);
     
    12271227            if (raidlist->el[raidlist->entries].progress != -1 &&
    12281228                raidlist->el[raidlist->entries].progress != 999) {
    1229                 log_msg(1, "Row %d should not occur in record!\n", row);
     1229                log_msg(1, "Row %d should not occur in record!", row);
    12301230            }
    12311231            break;
  • branches/3.2/mondo/src/common/libmondo-verify.c

    r3337 r3380  
    952952
    953953    sync();
    954     log_msg(2, "OK, I've mounted the USB Disk/Key\n");
     954    log_msg(2, "OK, I've mounted the USB Disk/Key");
    955955    mr_asprintf(tmp, "%s/archives/NOT-THE-LAST", mountpoint);
    956956    if (!does_file_exist(tmp)) {
     
    982982        retval++;
    983983    } else {
    984         log_msg(2, "OK, I've unmounted the USB device\n");
     984        log_msg(2, "OK, I've unmounted the USB device");
    985985    }
    986986    mr_free(tmp1);
     
    10801080        mr_free(command);
    10811081    }
    1082     log_msg(2, "OK, I've mounted the ISO/CD\n");
     1082    log_msg(2, "OK, I've mounted the ISO/CD");
    10831083    mr_asprintf(tmp, "%s/archives/NOT-THE-LAST", mountpoint);
    10841084    if (!does_file_exist(tmp)) {
     
    11131113        retval++;
    11141114    } else {
    1115         log_msg(2, "OK, I've unmounted the ISO file\n");
     1115        log_msg(2, "OK, I've unmounted the ISO file");
    11161116    }
    11171117    mr_free(mountpoint);
  • branches/3.2/mondo/src/mondoarchive/mondoarchive.c

    r3333 r3380  
    275275#define MDSTAT_FILE "/tmp/mdstat"
    276276        if (!(fin = fopen(MDSTAT_FILE, "r"))) {
    277             log_msg(1, "Could not open %s.\n", MDSTAT_FILE);
     277            log_msg(1, "Could not open %s.", MDSTAT_FILE);
    278278                finish(1);
    279279        }
  • branches/3.2/mondo/src/mondorestore/mondo-prep.c

    r3377 r3380  
    604604log_msg(4, "cmd built: %s", program);
    605605mr_strcat(program, " %s", devices);
    606 log_msg(2, "RAID device re-created with the following command:\n%s\n", program);
     606log_msg(2, "RAID device re-created with the following command:\n%s", program);
    607607if (test == TRUE) {
    608608    res = run_program_and_log_output(program, 1);
  • branches/3.2/mondo/src/mondorestore/mondorestore.c

    r3374 r3380  
    397397            g_current_media_number++;
    398398            mds = media_descriptor_string(bkpinfo->backup_media_type);
    399             log_msg(2, "Asking for %s #%d so that I may read slice #%ld\n", mds, g_current_media_number, sliceno);
     399            log_msg(2, "Asking for %s #%d so that I may read slice #%ld", mds, g_current_media_number, sliceno);
    400400            mr_free(mds);
    401401
     
    13591359    if (current_bigfile_number != noof_biggiefiles
    13601360        && noof_biggiefiles != 0) {
    1361         log_msg(1, "Warning - bigfileno=%ld but noof_biggiefiles=%ld\n", current_bigfile_number, noof_biggiefiles);
     1361        log_msg(1, "Warning - bigfileno=%ld but noof_biggiefiles=%ld", current_bigfile_number, noof_biggiefiles);
    13621362    } else {
    13631363        log_msg(1, "%ld biggiefiles in biggielist.txt; %ld biggiefiles processed today.", noof_biggiefiles, current_bigfile_number);
Note: See TracChangeset for help on using the changeset viewer.