Ignore:
Timestamp:
Jan 18, 2007, 1:47:59 PM (13 years ago)
Author:
bruno
Message:
  • mpt + ohci modules added for mindi
  • PATH fixed for init in restore (/usr/games added for petris + fixes)
  • Useless conf files removed from rootfs/etc or cleaned up
  • Still trying to have a working va_list by busybox alignment
File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/stable/mondo/src/lib/mr_msg.c

    r1054 r1061  
    3030    if ((fout = fopen(mr_logfile, "w")) == NULL) {
    3131        fprintf(stderr,"Unable to write to %s\n",mr_logfile);
    32         fprintf(stderr,"Logging desactivated\n",mr_logfile);
     32        fprintf(stderr,"Logging desactivated\n");
    3333        mr_msg_close();
    3434    }
     
    4141/*
    4242 * Function that log a message. Not called directly
    43  * but through macros in mr_msg.h
     43 * but through other functions
    4444 */
    45 void _mr_msg(int debug, const char *file, const char *function, int line, const char *fmt, ...) {
     45void _mr_msg(int debug, const char *file, const char *function, int line, const char *fmt, va_list args) {
    4646
    4747    int i = 0;
    4848    int res = 0;
    4949    FILE *fout = NULL;
    50     va_list args;
    5150
    5251    if (mr_logfile == NULL) {
     
    6665            fprintf(fout, "%s->%s#%d: ", file, function, line);
    6766        }
    68         va_start(args, fmt);
    6967        if (vfprintf(fout, fmt, args) < 0) {
    7068            fprintf(stderr,"Unable to print to %s\n",mr_logfile);
     69            return;
    7170        }
    72         va_end(args);
    7371
    7472        fprintf(fout, "\n");
     
    7977}
    8078
    81 void mr_msg(int level, const char *format, ...) {
     79void mr_msg(int level, const char *fmt, va_list args) {
    8280
    83     va_list args;
    84     va_start(args, format);
    85     _mr_msg(level, __FILE__, __FUNCTION__, __LINE__, format, args);
    86     va_end(args);
     81    _mr_msg(level, __FILE__, __FUNCTION__, __LINE__, fmt, args);
    8782}
Note: See TracChangeset for help on using the changeset viewer.