From a16211bb932067978f74606eb5d3f92e5227eee2 Mon Sep 17 00:00:00 2001 From: Jens Axboe Date: Thu, 15 Mar 2007 11:35:33 +0100 Subject: [PATCH] blockdev_invalidate_cache(): return -1 for error This follows the normal system calls, and makes fio pickup errno appropriately. Signed-off-by: Jens Axboe --- os-linux.h | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/os-linux.h b/os-linux.h index 84919539..d3b2e931 100644 --- a/os-linux.h +++ b/os-linux.h @@ -124,10 +124,7 @@ enum { static inline int blockdev_invalidate_cache(int fd) { - if (!ioctl(fd, BLKFLSBUF)) - return 0; - - return errno; + return ioctl(fd, BLKFLSBUF); } static inline int blockdev_size(int fd, unsigned long long *bytes) -- 2.25.1