Ignore:
Timestamp:
May 6, 2015, 11:57:35 PM (9 years ago)
Author:
Bruno Cornec
Message:
  • Do not use a \n with log_msg (ease debug with 99)
File:
1 edited

Legend:

Unmodified
Added
Removed
  • 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;
Note: See TracChangeset for help on using the changeset viewer.