X-Git-Url: https://git.kernel.dk/?a=blobdiff_plain;f=os%2Fos-freebsd.h;h=7a79dd0f70ca42c5063d7a58741f61fba75a62ed;hb=9b8365618309572d8fd2579c8ea3132db89f843f;hp=4a50a3cf9c6a31ee9d39fdf965056087d6a792ee;hpb=4ccdccd149d82c94ec6ccdb4118d9e27479b8516;p=fio.git diff --git a/os/os-freebsd.h b/os/os-freebsd.h index 4a50a3cf..7a79dd0f 100644 --- a/os/os-freebsd.h +++ b/os/os-freebsd.h @@ -5,20 +5,24 @@ #include #include +#include "../file.h" + #define FIO_HAVE_POSIXAIO #define FIO_HAVE_ODIRECT +#define FIO_HAVE_STRSEP #define FIO_USE_GENERIC_RAND #define FIO_HAVE_CHARDEV_SIZE +#define FIO_HAVE_CLOCK_MONOTONIC #define OS_MAP_ANON MAP_ANON typedef off_t off64_t; -static inline int blockdev_size(int fd, unsigned long long *bytes) +static inline int blockdev_size(struct fio_file *f, unsigned long long *bytes) { off_t size; - if (!ioctl(fd, DIOCGMEDIASIZE, &size)) { + if (!ioctl(f->fd, DIOCGMEDIASIZE, &size)) { *bytes = size; return 0; } @@ -27,12 +31,12 @@ static inline int blockdev_size(int fd, unsigned long long *bytes) return errno; } -static inline int chardev_size(int fd, unsigned long long *bytes) +static inline int chardev_size(struct fio_file *f, unsigned long long *bytes) { - return blockdev_size(fd, bytes); + return blockdev_size(f, bytes); } -static inline int blockdev_invalidate_cache(int fd) +static inline int blockdev_invalidate_cache(struct fio_file *f) { return EINVAL; }