diff options
author | David Cantrell <dcantrell@redhat.com> | 2006-06-14 03:26:49 +0000 |
---|---|---|
committer | David Cantrell <dcantrell@redhat.com> | 2006-06-14 03:26:49 +0000 |
commit | f42f802928ff6da6efdef74fab11df6d7bbee9fd (patch) | |
tree | 4d466aac0aaf752327b3ae31e38e6e98cb19b81b /loader2/log.c | |
parent | ff4a5c37a4d9f416c2d9c070c066785951835d83 (diff) | |
download | anaconda-f42f802928ff6da6efdef74fab11df6d7bbee9fd.tar.gz anaconda-f42f802928ff6da6efdef74fab11df6d7bbee9fd.tar.xz anaconda-f42f802928ff6da6efdef74fab11df6d7bbee9fd.zip |
* loader2/log.c: Removed vaLogMessage() and made logMessage() what
it was in a past life.
* loader2/log.h: Removed vaLogMessage() prototype.
* loader2/net.c (netlogger): Make a buffer of an arbitrary size, cram
the va_list in to that using vsnprintf(), pass to logMessage().
Diffstat (limited to 'loader2/log.c')
-rw-r--r-- | loader2/log.c | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/loader2/log.c b/loader2/log.c index efaf022de..5c1637dff 100644 --- a/loader2/log.c +++ b/loader2/log.c @@ -63,26 +63,29 @@ static void printLogHeader(int level, FILE *outfile) { void logMessage(int level, const char * s, ...) { va_list args; - va_start(args, s); - vaLogMessage(level, s, args); - va_end(args); -} -void vaLogMessage(int level, const char * s, va_list va) { /* Only log to the screen things that are above the minimum level. */ if (tty_logfile && level >= minLevel) { + va_start(args, s); + printLogHeader(level, tty_logfile); - vfprintf(tty_logfile, s, va); + vfprintf(tty_logfile, s, args); fprintf(tty_logfile, "\n"); fflush(tty_logfile); + + va_end(args); } /* But log everything to the file. */ if (file_logfile) { + va_start(args, s); + printLogHeader(level, file_logfile); - vfprintf(file_logfile, s, va); + vfprintf(file_logfile, s, args); fprintf(file_logfile, "\n"); fflush(file_logfile); + + va_end(args); } return; |