X-Git-Url: https://git.kernel.dk/?p=fio.git;a=blobdiff_plain;f=fio.h;h=2d57227c53cf13a68d15131d55e23376308d9295;hp=f6c2ee3bd81cd149b7f8da4866e48c32750765b7;hb=3b70d7e51e0b672a8b337c57c8faf865c0b7f415;hpb=eb8bbf48e79a8c6afd3c84e3d64263d10ee45daa diff --git a/fio.h b/fio.h index f6c2ee3b..2d57227c 100644 --- a/fio.h +++ b/fio.h @@ -441,4 +441,13 @@ static inline void fio_sem_up(volatile int volatile *sem) (*sem)++; } +/* + * If logging output to a file, stderr should go to both stderr and f_err + */ +#define log_err(args...) do { \ + fprintf(f_err, ##args); \ + if (f_err != stderr) \ + fprintf(stderr, ##args); \ + } while (0) + #endif