Changeset 3509 in MondoRescue for branches/3.2/mondo/src/lib/mr_conf.c


Ignore:
Timestamp:
Feb 13, 2016, 2:57:55 AM (4 years ago)
Author:
Bruno Cornec
Message:
  • Change mr_msg_int interface by adding the FUNCTION macro
  • Use mr_msg in mr_system
  • Ability to use that new log system everywhere now
File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/3.2/mondo/src/lib/mr_conf.c

    r3294 r3509  
    409409        switch (error_code) {
    410410        case MRCONF_BAD_FILE:
    411             mr_msg_int(1,line,file,"%s (%s) %s %s", MRCONF_STR_ERROR, mr_conf_filename, MRCONF_STR_BAD_FILE,
     411            mr_msg_int(1,line,file,"mr_conf_error_msg_int","%s (%s) %s %s", MRCONF_STR_ERROR, mr_conf_filename, MRCONF_STR_BAD_FILE,
    412412                   add_line);
    413413            break;
    414414
    415415        case MRCONF_READING_FAILED:
    416             mr_msg_int(1,line,file,"%s (%s) %s", MRCONF_STR_ERROR, mr_conf_filename, MRCONF_STR_READING_FAILED);
     416            mr_msg_int(1,line,file,"mr_conf_error_msg_int","%s (%s) %s", MRCONF_STR_ERROR, mr_conf_filename, MRCONF_STR_READING_FAILED);
    417417            break;
    418418
    419419        case MRCONF_FIELD_NOT_FOUND:
    420             mr_msg_int(1,line,file,"%s (%s) %s \"%s\"", MRCONF_STR_WARNING, mr_conf_filename, MRCONF_STR_FIELD_NOT_FOUND, add_line);
     420            mr_msg_int(1,line,file,"mr_conf_error_msg_int","%s (%s) %s \"%s\"", MRCONF_STR_WARNING, mr_conf_filename, MRCONF_STR_FIELD_NOT_FOUND, add_line);
    421421            break;
    422422
    423423        case MRCONF_FIELD_NO_VALUE:
    424             mr_msg_int(1,line,file,"%s (%s) %s \"%s\"", MRCONF_STR_ERROR, mr_conf_filename, MRCONF_STR_FIELD_NO_VALUE, add_line);
    425             mr_msg_int(1,line,file,"%s (%s) %s", MRCONF_STR_WARNING, mr_conf_filename, MRCONF_STR_IGNORE);
     424            mr_msg_int(1,line,file,"mr_conf_error_msg_int","%s (%s) %s \"%s\"", MRCONF_STR_ERROR, mr_conf_filename, MRCONF_STR_FIELD_NO_VALUE, add_line);
     425            mr_msg_int(1,line,file,"mr_conf_error_msg_int","%s (%s) %s", MRCONF_STR_WARNING, mr_conf_filename, MRCONF_STR_IGNORE);
    426426            break;
    427427
    428428        case MRCONF_CLOSE_BUT_NOT_OPEN:
    429             mr_msg_int(1,line,file,"%s (%s) %s", MRCONF_STR_WARNING, mr_conf_filename, MRCONF_STR_CLOSE_BUT_NOT_OPEN);
     429            mr_msg_int(1,line,file,"mr_conf_error_msg_int","%s (%s) %s", MRCONF_STR_WARNING, mr_conf_filename, MRCONF_STR_CLOSE_BUT_NOT_OPEN);
    430430            break;
    431431
    432432        case MRCONF_CALL_BUT_NOT_OPEN:
    433             mr_msg_int(1,line,file,"%s (%s) %s", MRCONF_STR_WARNING, mr_conf_filename, MRCONF_STR_CALL_BUT_NOT_OPEN);
     433            mr_msg_int(1,line,file,"mr_conf_error_msg_int","%s (%s) %s", MRCONF_STR_WARNING, mr_conf_filename, MRCONF_STR_CALL_BUT_NOT_OPEN);
    434434            break;
    435435
    436436        case MRCONF_OPEN_OPENED:
    437             mr_msg_int(1,line,file,"%s (%s) %s", MRCONF_STR_ERROR, mr_conf_filename, MRCONF_STR_OPEN_OPENED);
     437            mr_msg_int(1,line,file,"mr_conf_error_msg_int","%s (%s) %s", MRCONF_STR_ERROR, mr_conf_filename, MRCONF_STR_OPEN_OPENED);
    438438            break;
    439439
    440440        case MRCONF_STRING_QUOTE:
    441             mr_msg_int(1,line,file,"%s: %s (%s) %s", add_line, MRCONF_STR_ERROR, mr_conf_filename, MRCONF_STR_STRING_QUOTE);
     441            mr_msg_int(1,line,file,"mr_conf_error_msg_int","%s: %s (%s) %s", add_line, MRCONF_STR_ERROR, mr_conf_filename, MRCONF_STR_STRING_QUOTE);
    442442            break;
    443443
    444444        case MRCONF_STRING_ENDQUOTE:
    445             mr_msg_int(1,line,file,"%s: %s (%s) %s", add_line, MRCONF_STR_ERROR, mr_conf_filename, MRCONF_STR_STRING_ENDQUOTE);
     445            mr_msg_int(1,line,file,"mr_conf_error_msg_int","%s: %s (%s) %s", add_line, MRCONF_STR_ERROR, mr_conf_filename, MRCONF_STR_STRING_ENDQUOTE);
    446446            break;
    447447
    448448        default:
    449             mr_msg_int(1,line,file,"%s (%s) %s", MRCONF_STR_ERROR, mr_conf_filename, MRCONF_STR_DEFAULT_ERROR);
    450             break;
    451         }
    452     }
    453 }
     449            mr_msg_int(1,line,file,"mr_conf_error_msg_int","%s (%s) %s", MRCONF_STR_ERROR, mr_conf_filename, MRCONF_STR_DEFAULT_ERROR);
     450            break;
     451        }
     452    }
     453}
Note: See TracChangeset for help on using the changeset viewer.