[PATCH] Make it easier to match up filename and job number
[fio.git] / fio.h
diff --git a/fio.h b/fio.h
index f6c2ee3bd81cd149b7f8da4866e48c32750765b7..49603ebc70f1cbbda6db2cf7ee15c39c93c97f14 100644 (file)
--- a/fio.h
+++ b/fio.h
@@ -191,7 +191,6 @@ struct thread_data {
        unsigned int numjobs;
        unsigned int iodepth;
        os_cpu_mask_t cpumask;
-       unsigned int jobnum;
        unsigned int iolog;
        unsigned int read_iolog;
        unsigned int write_iolog;
@@ -441,4 +440,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