projects
/
fio.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
FIO Windows update
[fio.git]
/
os
/
os-freebsd.h
diff --git
a/os/os-freebsd.h
b/os/os-freebsd.h
index bb7e9a3b0697a0d1c0eb25858126677858d1355f..0cb7ae5e5ca079380e20a514f1f0f1b9df3748c2 100644
(file)
--- a/
os/os-freebsd.h
+++ b/
os/os-freebsd.h
@@
-7,17
+7,21
@@
#define FIO_HAVE_POSIXAIO
#define FIO_HAVE_ODIRECT
#define FIO_HAVE_POSIXAIO
#define FIO_HAVE_ODIRECT
+#define FIO_HAVE_IOPRIO
+#define FIO_HAVE_STRSEP
#define FIO_USE_GENERIC_RAND
#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;
#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;
{
off_t size;
- if (!ioctl(fd, DIOCGMEDIASIZE, &size)) {
+ if (!ioctl(f
->f
d, DIOCGMEDIASIZE, &size)) {
*bytes = size;
return 0;
}
*bytes = size;
return 0;
}
@@
-26,7
+30,12
@@
static inline int blockdev_size(int fd, unsigned long long *bytes)
return errno;
}
return errno;
}
-static inline int blockdev_invalidate_cache(int fd)
+static inline int chardev_size(struct fio_file *f, unsigned long long *bytes)
+{
+ return blockdev_size(f->fd, bytes);
+}
+
+static inline int blockdev_invalidate_cache(struct fio_file *f)
{
return EINVAL;
}
{
return EINVAL;
}