X-Git-Url: https://git.kernel.dk/?a=blobdiff_plain;f=log.c;h=237bac28899c9feaf603835040732d0901d1acbf;hb=0360d61fbfcc1f07bcdc16672f5040f8cf49681f;hp=7e8b13b31a84c906a09db6fce5044ef8e051fcae;hpb=0f0346e0c8f9141ceea8a5de8264c635ea0cae9b;p=fio.git diff --git a/log.c b/log.c index 7e8b13b3..237bac28 100644 --- a/log.c +++ b/log.c @@ -1,5 +1,4 @@ #include -#include #include #include #include @@ -16,7 +15,7 @@ size_t log_info_buf(const char *buf, size_t len) return 0; if (is_backend) { - size_t ret = fio_server_text_output(FIO_LOG_INFO, buf, len); + ssize_t ret = fio_server_text_output(FIO_LOG_INFO, buf, len); if (ret != -1) return ret; } @@ -43,6 +42,7 @@ size_t log_valist(const char *fmt, va_list args) } /* add prefix for the specified type in front of the valist */ +#ifdef FIO_INC_DEBUG void log_prevalist(int type, const char *fmt, va_list args) { char *buf1, *buf2; @@ -62,14 +62,15 @@ void log_prevalist(int type, const char *fmt, va_list args) free(buf1); if (len < 0) return; - len = log_info_buf(buf2, len); + log_info_buf(buf2, len); free(buf2); } +#endif -size_t log_info(const char *format, ...) +ssize_t log_info(const char *format, ...) { va_list args; - size_t ret; + ssize_t ret; va_start(args, format); ret = log_valist(format, args); @@ -103,9 +104,9 @@ int log_info_flush(void) return fflush(f_out); } -size_t log_err(const char *format, ...) +ssize_t log_err(const char *format, ...) { - size_t ret; + ssize_t ret; int len; char *buffer; va_list args;