projects
/
fio.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
change os_trim() prototype not to use int fd
[fio.git]
/
os
/
os-freebsd.h
diff --git
a/os/os-freebsd.h
b/os/os-freebsd.h
index c7863b5e02eb5b978f266cc5d9329827c1819aca..4a7cdeb7daaf2cef234c5a0c0ec551c7e72e4dad 100644
(file)
--- a/
os/os-freebsd.h
+++ b/
os/os-freebsd.h
@@
-6,6
+6,7
@@
#include <errno.h>
#include <sys/sysctl.h>
#include <sys/disk.h>
#include <errno.h>
#include <sys/sysctl.h>
#include <sys/disk.h>
+#include <sys/endian.h>
#include <sys/thr.h>
#include <sys/socket.h>
#include <sys/param.h>
#include <sys/thr.h>
#include <sys/socket.h>
#include <sys/param.h>
@@
-116,7
+117,7
@@
static inline unsigned long long get_fs_free_size(const char *path)
return ret;
}
return ret;
}
-static inline int os_trim(
int fd
, unsigned long long start,
+static inline int os_trim(
struct fio_file *f
, unsigned long long start,
unsigned long long len)
{
off_t range[2];
unsigned long long len)
{
off_t range[2];
@@
-124,7
+125,7
@@
static inline int os_trim(int fd, unsigned long long start,
range[0] = start;
range[1] = len;
range[0] = start;
range[1] = len;
- if (!ioctl(fd, DIOCGDELETE, range))
+ if (!ioctl(f
->f
d, DIOCGDELETE, range))
return 0;
return errno;
return 0;
return errno;