gettime: if setaffinity fails, print the errno error
authorJens Axboe <axboe@fb.com>
Wed, 28 Jan 2015 21:34:10 +0000 (14:34 -0700)
committerJens Axboe <axboe@fb.com>
Wed, 28 Jan 2015 21:34:10 +0000 (14:34 -0700)
Signed-off-by: Jens Axboe <axboe@fb.com>
gettime.c

index 72968c5..f40abc7 100644 (file)
--- a/gettime.c
+++ b/gettime.c
@@ -481,7 +481,9 @@ static void *clock_thread_fn(void *data)
        fio_cpu_set(&cpu_mask, t->cpu);
 
        if (fio_setaffinity(gettid(), cpu_mask) == -1) {
-               log_err("clock setaffinity failed\n");
+               int __err = errno;
+
+               log_err("clock setaffinity failed: %s\n", strerror(__err));
                return (void *) 1;
        }