summaryrefslogtreecommitdiff
path: root/os/os.h
diff options
context:
space:
mode:
authorJens Axboe <jens.axboe@oracle.com>2009-12-15 08:58:10 +0100
committerJens Axboe <jens.axboe@oracle.com>2009-12-15 08:58:10 +0100
commit3b2e1464ae58caf42c74ab4bdeaa5eae7c38a23f (patch)
tree6759f5a785aaa218df9bc90096303e719ba910a3 /os/os.h
parent2afd826bf6cd19900aee70ae14ede92d91b6f4c0 (diff)
downloadfio-3b2e1464ae58caf42c74ab4bdeaa5eae7c38a23f.tar.gz
fio-3b2e1464ae58caf42c74ab4bdeaa5eae7c38a23f.tar.bz2
Fix some issues with the OSX port
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
Diffstat (limited to 'os/os.h')
-rw-r--r--os/os.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/os/os.h b/os/os.h
index bed12814..a14c4857 100644
--- a/os/os.h
+++ b/os/os.h
@@ -111,8 +111,11 @@ static inline int os_cache_line_size(void)
#ifdef FIO_USE_GENERIC_BDEV_SIZE
static inline int blockdev_size(int fd, unsigned long long *bytes)
{
- off_t end = lseek(fd, 0, SEEK_END);
+ off_t end;
+ *bytes = 0;
+
+ end = lseek(fd, 0, SEEK_END);
if (end < 0)
return errno;